Skip to content

Commit

Permalink
Updated Sublime Snippets.
Browse files Browse the repository at this point in the history
Co-authored-by: Denny Korsukéwitz <dennykorsukewitz@gmail.com>
  • Loading branch information
NiklasSchmitt and dennykorsukewitz committed Mar 20, 2023
1 parent 75e0bf1 commit ffab6c0
Show file tree
Hide file tree
Showing 30 changed files with 98 additions and 77 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<content><![CDATA[
${1:my \$Success = \$ArticleObject->ArticleSearchIndexRebuildFlagSet(
ArticleIDs => [ 123, 234, 345 ] # (Either 'ArticleIDs' or 'All' must be provided) The ArticleIDs to be updated.
All => 1 # (Either 'ArticleIDs' or 'All' must be provided) Set all articles to \$Value. Default: 0,
All => 1, # (Either 'ArticleIDs' or 'All' must be provided) Set all articles to \$Value. Default: 0,
Value => 1, # 0/1 default 0
);}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ${1:my \$FieldHTML = \$BackendObject->EditFieldRender(
\},
Template => \{ # Optional data structure of GenericAgent etc.
Owner => 2, # Value is accessable via field name (DynamicField_ + field name)
Title => 'Generic Agent Job was here' # and could be a scalar, Hash- or ArrayRef
Title => 'Generic Agent Job was here', # and could be a scalar, Hash- or ArrayRef
...
DynamicField_ExampleField1 => 'Value 1'
\},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
${1:my \$Value = \$BackendObject->EditFieldValueGet(
DynamicFieldConfig => \$DynamicFieldConfig, # complete config of the DynamicField
ParamObject => \$ParamObject, # the current request data
TransformDates => 0 # 1 || 0, default 1, to transform the dynamic fields that
TransformDates => 0, # 1 || 0, default 1, to transform the dynamic fields that
# use dates to the user time zone (i.e. Date, DateTime
# dynamic fields)
Template => \$Template # stored values from DB like Search profile or Generic Agent job
Template => \$Template, # stored values from DB like Search profile or Generic Agent job
ReturnTemplateStructure => 1, # 0 || 1, default 0
# Returns the structured values as got from the http request
# (only for backend internal use).
Expand All @@ -16,7 +16,7 @@ ${2:my \$Value = \$BackendObject->EditFieldValueGet(
DynamicFieldConfig => \$DynamicFieldConfig, # complete config of the DynamicField
ParamObject => \$ParamObject, # the current request data
LayoutObject => \$LayoutObject, # used to transform dates to user time zone
TransformDates => 1 # 1 || 0, default 1, to transform the dynamic fields that
TransformDates => 1, # 1 || 0, default 1, to transform the dynamic fields that
# use dates to the user time zone (i.e. Date, DateTime
# dynamic fields)
Template => \$Template,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<snippet>
<content><![CDATA[
${1:my \$Success = \$CommunicationLogObject->ObjectLog(
ObjectLogType => '...' # (required) To be defined by the related LogObject
ObjectLogID => \$ObjectLogID, # (required) The ObjectID of the started object type
ObjectLogType => '...', # (required) To be defined by the related LogObject
ObjectLogID => \$ObjectLogID, # (required) The ObjectID of the started object type
);}
]]></content>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<snippet>
<content><![CDATA[
${1:my \$Success = \$CommunicationLogObject->ObjectLogStop(
ObjectLogType => 'Connection' # (required) Can be 'Connection' or 'Message'
ObjectLogType => 'Connection', # (required) Can be 'Connection' or 'Message'
ObjectLogID => \$ObjectLogID, # (required) The ObjectID of the started object type
);}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<content><![CDATA[
${1:\$CustomerUserObject->CustomerUserUpdate(
Source => 'CustomerUser', # CustomerUser source config
ID => 'mh' # current user login
ID => 'mh', # current user login
UserLogin => 'mhuber', # new user login
UserFirstname => 'Huber',
UserLastname => 'Manfred',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ${1:my \$SQL = \$DBObject->QueryCondition(
Key => 'some_col',
Value => '(ABC+DEF)',
SearchPrefix => '',
SearchSuffix => '*'
SearchSuffix => '*',
Extended => 1, # use also " " as "&&", e.g. "bob smith" -> "bob&&smith"
);}
${2:my \$SQL = \$DBObject->QueryCondition(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
${1:my \$Success = \$DebugLogObject->LogAdd(
CommunicationID => \$CommunicationID,
CommunicationType => 'Provider', # 'Provider' or 'Requester'
Data => 'additional data' # optional
DebugLevel => 'info', # 'debug', 'info', 'notice', 'error'
RemoteIP => '192.168.0.1', # optional, must be valid IPv4 or IPv6 address
Data => 'additional data', # optional
DebugLevel => 'info', # 'debug', 'info', 'notice', 'error'
RemoteIP => '192.168.0.1', # optional, must be valid IPv4 or IPv6 address
Summary => 'description of log entry',
WebserviceID => \$WebserviceID,
);}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
${1:\$GenericAgentObject->JobRun(
Job => 'JobName',
OnlyTicketID => \$OnlyTicketID, # (optional) for event based Job execution
SleepTime => 100_000 # (optional) sleeptime per ticket in microseconds
SleepTime => 100_000, # (optional) sleeptime per ticket in microseconds
UserID => \$UserID,
);}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<content><![CDATA[
${1:my \$TestUserLogin = \$HelperObject->TestUserCreate(
Groups => ['admin', 'users'], # optional, list of groups to add this user to (rw rights)
Language => 'de' # optional, defaults to 'en' if not set
Language => 'de', # optional, defaults to 'en' if not set
KeepValid => 1, # optional, defaults to 0
);}
${2:my \$TestUserLogin = \$HelperObject->TestUserCreate(
Expand All @@ -11,7 +11,7 @@ ${2:my \$TestUserLogin = \$HelperObject->TestUserCreate(
);}
${3:my ( \$TestUserLogin, \$TestUserID ) = \$HelperObject->TestUserCreate(
Groups => ['admin', 'users'],
Language => 'de'
Language => 'de',
KeepValid => 1,
);}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<content><![CDATA[
${1:\$ObjectList = \$LinkObject->ObjectSearch(
Object => 'ITSMConfigItem',
SubObject => 'Computer' # (optional)
SubObject => 'Computer', # (optional)
SearchParams => \$HashRef, # (optional)
UserID => \$UserID,
);}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ ${1:my \$TargetFilename = \$LoaderObject->MinifyFiles(
\$Filename,
\$Filename2,
],
Checksum => '...' # optional, pass a checksum for the minified file
Content => '...' # optional, pass direct (already minified) content instead of a file list
Checksum => '...', # optional, pass a checksum for the minified file
Content => '...', # optional, pass direct (already minified) content instead of a file list
Type => 'CSS', # CSS | JavaScript
TargetDirectory => \$TargetDirectory,
TargetFilenamePrefix => 'CommonCSS', # optional, prefix for the target filename
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<snippet>
<content><![CDATA[
${1:my \$List = \$MailQueueObject->List(
ID => '...' # optional
ArticleID => \$ArticleID # optional
Sender => '...' # optional
Recipient => '...' # optional
Attempts => '...' # optional
ID => '...', # optional
ArticleID => \$ArticleID, # optional
Sender => '...', # optional
Recipient => '...', # optional
Attempts => '...', # optional
);}
]]></content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ${1:my \$Success = \$MainObject->FileDelete(
Directory => 'c:\some\location',
Filename => 'me_to/alal.xml',
# or Location
Location => 'c:\some\location\me_to\alal.xml'
Location => 'c:\some\location\me_to\alal.xml',
Type => 'Local', # optional - Local|Attachment|MD5
DisableWarnings => 1, # optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<content><![CDATA[
${1:\$True = \$PDFObject->HLine(
Width => 300, # (optional) default 'end of printable dimension'
Type => 'ReturnFalse' # (optional) default Cut (ReturnFalse|Cut)
Type => 'ReturnFalse', # (optional) default Cut (ReturnFalse|Cut)
Color => '#101010', # (optional) default black
LineWidth => 1, # (optional) default 1
);}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<content><![CDATA[
${1:\$True = \$PDFObject->Image(
File => '/path/image.gif', # (gif|jpg|png)
Type => 'ReturnFalse' # (optional) default Reduce (ReturnFalse|Reduce)
Type => 'ReturnFalse', # (optional) default Reduce (ReturnFalse|Reduce)
Width => 300, # width of image
Height => 150, # height of image
);}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ ${1:my \$Package = \$PackageObject->PackageBuild(
],
Filelist = [
\{
Location => 'Kernel/System/Lala.pm'
Location => 'Kernel/System/Lala.pm',
Permission => '644',
Content => \$FileInString,
\},
\{
Location => 'Kernel/System/Lulu.pm'
Location => 'Kernel/System/Lulu.pm',
Permission => '644',
Content => \$FileInString,
\},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<snippet>
<content><![CDATA[
${1:my \$FormDraftID = \$ParamObject->SaveFormDraft(
UserID => \$UserID
UserID => \$UserID,
ObjectType => 'Ticket',
ObjectID => \$ObjectID,
OverrideParams => \{ # optional, can contain strings and array references
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ ${1:my \$Success = \$QueueObject->QueueUpdate(
UserID => \$UserID,
FollowUpID => \$FollowUpID,
Comment => 'Some Comment2',
DefaultSignKey => ''
UnlockTimeOut => ''
DefaultSignKey => '',
UnlockTimeOut => '',
FollowUpLock => 1,
ParentQueueID => \$ParentQueueID,
);}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ ${1:my \$Success = \$SeleniumObject->WaitFor(
JavaScript => 'return \$(".someclass").length', # JavaScript code that checks condition
WindowCount => 2, # Wait until this many windows are open
Time => 20, # optional, wait time in seconds (default 20)
SkipDie => 1, # Instead of a dying process do return the result of the wait for
);}
${2:my \$Success = \$SeleniumObject->WaitFor(
AlertPresent => 1, # Wait until an alert, confirm or prompt dialog is present
Callback => sub \{ ... \} # Wait until function returns true
ElementExists => 'xpath-selector' # Wait until an element is present
ElementExists => 'xpath-selector', # Wait until an element is present
ElementExists => ['css-selector', 'css'],
ElementMissing => 'xpath-selector', # Wait until an element is not present
ElementMissing => ['css-selector', 'css'],
JavaScript => 'return \$(".someclass").length', # JavaScript code that checks condition
WindowCount => 2, # Wait until this many windows are open
Time => 20, # optional, wait time in seconds (default 20)
SkipDie => 1, # Instead of a dying process do return the result of the wait for
);}
]]></content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<content><![CDATA[
${1:my @Result = \$SysConfigObject->ConfigurationSearch(
Search => 'The search string', # (optional)
Category => 'OTRS' # (optional)
Category => 'OTRS', # (optional)
IncludeInvisible => 1, # (optional) Default 0.
);}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ${1:my %Result = \$SysConfigObject->SettingEffectiveValueCheck(
],
\},
StoreCache => 1, # (optional) Store result in the Cache. Default 0.
SettingUID => \$SettingUID # (required if StoreCache)
SettingUID => \$SettingUID, # (required if StoreCache)
NoValidation => 1, # (optional) no value type validation.
CurrentSystemTime => 1507894796935, # (optional) Use provided 1507894796935, otherwise calculate
ExpireTime => 1507894896935, # (optional) Use provided ExpireTime for cache, otherwise calculate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<snippet>
<content><![CDATA[
${1:my \$ID = \$SystemMaintenanceObject->SystemMaintenanceAdd(
StartDate => 1485346000 # mandatory
StopDate => 1485349600 # mandatory
StartDate => 1485346000, # mandatory
StopDate => 1485349600, # mandatory
Comment => 'Comment', # mandatory
LoginMessage => 'A login message.', # optional
ShowLoginMessage => 1, # optional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
${1:my %Attributes = \$TemplateGeneratorObject->Attributes(
TicketID => \$TicketID,
ArticleID => \$ArticleID,
ResponseID => \$ResponseID
ResponseID => \$ResponseID,
UserID => \$UserID,
Action => 'Forward', # Possible values are Reply and Forward, Reply is default.
);}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<snippet>
<content><![CDATA[
${1:my \$Template = \$TemplateGeneratorObject->Template(
TemplateID => \$TemplateID
TemplateID => \$TemplateID,
TicketID => \$TicketID, # Optional
Data => \$ArticleHashRef, # Optional
UserID => \$UserID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ ${2:my \$Success = \$TicketObject->TicketAcl(
OwnerID => \$OwnerID, # Optional
NewOwnerID => \$NewOwnerID, # Optional, OwnerID or NewOwnerID can be
# used and they both refers to OwnerID
Owner => 'some user login' # Optional
Owner => 'some user login', # Optional
ResponsibleID => \$ResponsibleID, # Optional
NewResponsibleID => \$NewResponsibleID, # Optional, ResponsibleID or NewResposibleID
# can be used and they both refers to
# ResponsibleID
Responsible => 'some user login' # Optional
Responsible => 'some user login', # Optional
ReturnType => 'Action', # To match Possible, PossibleAdd or
# PossibleNot key in ACL
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
<snippet>
<content><![CDATA[
${1:\$Self->Run(
Tests => ['JSON', 'User'], # optional, execute certain test files
Directory => ['Selenium', 'User'], # optional, execute tests in subdirectory
Package => ['ITSMCore'], # optional, execute tests of installed package
ExcludeDirectory => ['Selenium/Agent/Admin'], # optional, all test files in the specified directory will be Excluded.
SOPMFile => ['ITSMCore.sopm'], # optional, execute all test files which are defined in these sopm.
Verbose => 1, # optional (default 0), only show result details for all tests, not just failing
SubmitURL => \$URL, # optional, send results to unit test result server
SubmitAuth => \$SubmitAuth, # optional authentication string for unit test result server
SubmitResultAsExitCode => 1, # optional, specify if exit code should not indicate if tests were ok/not ok, but if submission was successful instead
JobID => \$JobID, # optional job ID for unit test submission to server
Scenario => 'Znuny 6 git', # optional scenario identifier for unit test submission to server
PostTestScripts => ['...'], # Script(s) to execute after a test has been run.
# You can specify %File%, %TestOk% and %TestNotOk% as dynamic arguments.
PreSubmitScripts => ['...'], # Script(s) to execute after all tests have been executed
# and the results are about to be sent to the server.
NumberOfTestRuns => 10, # optional (default 1), number of successive runs for every single unit test
);}
${2:\$Self->Run(
Tests => ['JSON', 'User'], # optional, execute certain test files only
Directory => ['Selenium', 'User'], # optional, execute tests in subdirectory
ExcludeDirectory => ['Selenium/Agent/Admin'], # optional, all test files in the specified directory will be Excluded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
${1:my \$Success = \$VirtualFSObject->Write(
Content => \\$Content,
Filename => '/Object/SomeFileName.txt',
Mode => 'binary' # (binary|utf8)
Mode => 'binary', # (binary|utf8)
# optional, preferences data
Preferences => \{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<content><![CDATA[
${1:my \$Success = \$WebserviceHistoryObject->WebserviceHistoryUpdate(
ID => 123,
WebserviceID => \$WebserviceID
WebserviceID => \$WebserviceID,
Config => \$ConfigHashRef,
UserID => \$UserID,
);}
Expand Down
Loading

0 comments on commit ffab6c0

Please sign in to comment.