scenario
in package
Table of Contents
Properties
- $_changed : mixed
- $_changeState : mixed
- $_do : mixed
- $_elements : mixed
- $_log : mixed
- $_realTrigger : mixed
- $_realTriggerValue : mixed
- $_return : bool
- $_tags : mixed
- $_templateArray : mixed
- $configuration : mixed
- $description : mixed
- $display : mixed
- $group : string
- The group that the scenario belongs to.
- $id : mixed
- The unique identifier for the scenario.
- $isActive : int
- Indicates whether the scenario is active or not.
- $isVisible : mixed
- $mode : mixed
- The mode of the scenario.
- $name : mixed
- The name of the scenario.
- $object_id : mixed
- $order : mixed
- $scenarioElement : mixed
- $schedule : mixed
- The schedule for the scenario.
- $timeout : mixed
- $trigger : mixed
Methods
- addTag() : mixed
- all() : array<string|int, scenario>
- Renvoie tous les objets scenario
- allOrderedByGroupObjectName() : array<string|int, scenario>
- return all scenarios ordered by [group][objectName][scenarioName]
- byElement() : scenario
- byGenericTrigger() : array<string|int, scenario>
- byId() : scenario
- Renvoie un objet scenario
- byObjectId() : array<string|int, scenario>
- byObjectNameGroupNameScenarioName() : scenario
- byString() : mixed
- byTrigger() : array<string|int, scenario>
- calculateScheduleDate() : mixed
- check() : void|true
- cleanTable() : mixed
- clearLog() : mixed
- consystencyCheck() : mixed
- control() : mixed
- copy() : scenario
- doIn() : void
- emptyCacheWidget() : mixed
- execute() : mixed
- export() : string|array<string|int, mixed>
- fromHumanReadable() : string|object|array<string|int, mixed>
- getCache() : mixed
- getChanged() : mixed
- getConfiguration() : mixed
- getData() : mixed
- getDescription() : string
- getDisplay() : mixed
- getDo() : bool
- getDo
- getElement() : mixed
- getGroup() : mixed
- getHumanName() : string
- getIcon() : string
- getId() : int
- getIsActive() : bool
- getIsVisible() : int
- getLastLaunch() : mixed
- getLinkData() : array<string|int, mixed>
- getLinkToConfiguration() : mixed
- getLog() : string
- getMode() : mixed
- getName() : string
- getObject() : object
- getObject_id() : mixed
- getOrder() : mixed
- getPID() : mixed
- getReturn() : bool
- getReturn
- getScenarioElement() : mixed
- getSchedule() : string|object
- getState() : mixed
- getTag() : mixed
- getTags() : array<string|int, mixed>
- getTags
- getTemplate() : mixed
- getTimeout() : int
- getTrigger() : mixed
- getUse() : mixed
- getUsedBy() : mixed
- hasRight() : bool
- isDue() : bool
- launch() : bool
- listGroup() : array<string|int, scenario>
- persistLog() : mixed
- postInsert() : mixed
- preSave() : mixed
- refresh() : mixed
- remove() : mixed
- removeData() : bool
- resetRepeatIfStatus() : mixed
- running() : bool
- save() : mixed
- schedule() : array<string|int, scenario>
- searchByTrigger() : array<string|int, scenario>
- searchByUse() : array<string|int, mixed>
- setCache() : mixed
- setChanged() : mixed
- setConfiguration() : $this
- setData() : true
- setDescription() : $this
- setDisplay() : $this
- setDo() : $this
- setGroup() : $this
- setId() : $this
- setIsActive() : $this
- setIsVisible() : $this
- setLastLaunch() : mixed
- setLog() : mixed
- setMode() : $this
- setName() : $this
- setObject_id() : $this
- setOrder() : $this
- setPID() : mixed
- setReturn() : $this
- setScenarioElement() : mixed
- setSchedule() : $this
- setState() : mixed
- setTags() : $this
- setTags
- setTimeout() : $this
- setTrigger() : mixed
- stop() : bool
- testTrigger() : bool
- toArray() : mixed
- toHtml() : string
- toHumanReadable() : string|object|array<string|int, mixed>
Properties
$_changed
private
mixed
$_changed
= \false
$_changeState
private
mixed
$_changeState
= \false
$_do
private
mixed
$_do
= \true
$_elements
private
mixed
$_elements
= array()
$_log
private
mixed
$_log
$_realTrigger
private
mixed
$_realTrigger
= ''
$_realTriggerValue
private
mixed
$_realTriggerValue
= ''
$_return
private
bool
$_return
= \true
$_tags
private
mixed
$_tags
= array('#trigger#' => '', '#trigger_name#' => '', '#trigger_id#' => '', '#trigger_message#' => '', '#trigger_value#' => '')
$_templateArray
private
static mixed
$_templateArray
$configuration
private
mixed
$configuration
$description
private
mixed
$description
$display
private
mixed
$display
$group
The group that the scenario belongs to.
private
string
$group
= ''
$id
The unique identifier for the scenario.
private
mixed
$id
$isActive
Indicates whether the scenario is active or not.
private
int
$isActive
= 1
$isVisible
private
mixed
$isVisible
= 0
$mode
The mode of the scenario.
private
mixed
$mode
$name
The name of the scenario.
private
mixed
$name
$object_id
private
mixed
$object_id
= \null
$order
private
mixed
$order
= 9999
$scenarioElement
private
mixed
$scenarioElement
$schedule
The schedule for the scenario.
private
mixed
$schedule
$timeout
private
mixed
$timeout
= 0
$trigger
private
mixed
$trigger
Methods
addTag()
public
addTag(mixed $_key, mixed $value) : mixed
Parameters
- $_key : mixed
- $value : mixed
all()
Renvoie tous les objets scenario
public
static all([mixed $_group = '' ]) : array<string|int, scenario>
Parameters
- $_group : mixed = ''
Return values
array<string|int, scenario>allOrderedByGroupObjectName()
return all scenarios ordered by [group][objectName][scenarioName]
public
static allOrderedByGroupObjectName([mixed $_asGroup = false ]) : array<string|int, scenario>
Parameters
- $_asGroup : mixed = false
Return values
array<string|int, scenario>byElement()
public
static byElement(string $_element_id) : scenario
Parameters
- $_element_id : string
Return values
scenariobyGenericTrigger()
public
static byGenericTrigger(string $_generic, object $_object[, bool $_onlyEnable = true ]) : array<string|int, scenario>
Parameters
- $_generic : string
- $_object : object
- $_onlyEnable : bool = true
Return values
array<string|int, scenario>byId()
Renvoie un objet scenario
public
static byId(int $_id) : scenario
Parameters
- $_id : int
-
id du scenario voulu
Tags
Return values
scenario —object scenario
byObjectId()
public
static byObjectId(null|int $_object_id[, bool $_onlyEnable = true ][, bool $_onlyVisible = false ]) : array<string|int, scenario>
Parameters
- $_object_id : null|int
- $_onlyEnable : bool = true
- $_onlyVisible : bool = false
Return values
array<string|int, scenario>byObjectNameGroupNameScenarioName()
public
static byObjectNameGroupNameScenarioName(string $_object_name, string $_group_name, string $_scenario_name) : scenario
Parameters
- $_object_name : string
- $_group_name : string
- $_scenario_name : string
Return values
scenariobyString()
public
static byString(mixed $_string) : mixed
Parameters
- $_string : mixed
byTrigger()
public
static byTrigger(string $_cmd_id[, bool $_onlyEnable = true ]) : array<string|int, scenario>
Parameters
- $_cmd_id : string
- $_onlyEnable : bool = true
Return values
array<string|int, scenario>calculateScheduleDate()
public
calculateScheduleDate() : mixed
check()
public
static check([null|object|string $_event = null ][, bool $_forceSyncMode = false ][, null|string $_generic = null ][, null|object $_object = null ][, null|string $_value = null ][, mixed $_options = null ]) : void|true
Parameters
- $_event : null|object|string = null
- $_forceSyncMode : bool = false
- $_generic : null|string = null
- $_object : null|object = null
- $_value : null|string = null
- $_options : mixed = null
Return values
void|truecleanTable()
public
static cleanTable() : mixed
clearLog()
public
clearLog() : mixed
consystencyCheck()
public
static consystencyCheck([mixed $_needsReturn = false ]) : mixed
Parameters
- $_needsReturn : mixed = false
control()
public
static control() : mixed
copy()
public
copy(string $_name) : scenario
Parameters
- $_name : string
Return values
scenariodoIn()
public
static doIn(array<string|int, mixed> $_options) : void
Parameters
- $_options : array<string|int, mixed>
emptyCacheWidget()
public
emptyCacheWidget() : mixed
Tags
execute()
public
execute([string $instance_id = '' ]) : mixed
Parameters
- $instance_id : string = ''
export()
public
export([string $_mode = 'text' ]) : string|array<string|int, mixed>
Parameters
- $_mode : string = 'text'
-
accepted value: ['text'|'array']
Return values
string|array<string|int, mixed> —depending $_mode parameter
fromHumanReadable()
public
static fromHumanReadable(string|object|array<string|int, mixed> $_input) : string|object|array<string|int, mixed>
Parameters
- $_input : string|object|array<string|int, mixed>
Return values
string|object|array<string|int, mixed> —return value will depends on $_input received
getCache()
public
getCache([mixed $_key = '' ][, mixed $_default = '' ]) : mixed
Parameters
- $_key : mixed = ''
- $_default : mixed = ''
getChanged()
public
getChanged() : mixed
getConfiguration()
public
getConfiguration([string $_key = '' ][, string $_default = '' ]) : mixed
Parameters
- $_key : string = ''
- $_default : string = ''
getData()
public
getData(mixed $_key[, mixed $_private = false ][, mixed $_default = '' ]) : mixed
Parameters
- $_key : mixed
- $_private : mixed = false
- $_default : mixed = ''
getDescription()
public
getDescription() : string
Return values
stringgetDisplay()
public
getDisplay([string $_key = '' ][, string $_default = '' ]) : mixed
Parameters
- $_key : string = ''
- $_default : string = ''
getDo()
getDo
public
getDo() : bool
Return values
boolgetElement()
public
getElement() : mixed
getGroup()
public
getGroup() : mixed
getHumanName()
public
getHumanName([bool $_complete = true ][, bool $_noGroup = false ][, bool $_tag = false ][, bool $_prettify = false ][, bool $_withoutScenarioName = false ][, mixed $_object_name = true ]) : string
Parameters
- $_complete : bool = true
- $_noGroup : bool = false
- $_tag : bool = false
- $_prettify : bool = false
- $_withoutScenarioName : bool = false
- $_object_name : mixed = true
Return values
stringgetIcon()
public
getIcon([bool $_only_class = false ]) : string
Parameters
- $_only_class : bool = false
Return values
stringgetId()
public
getId() : int
Return values
intgetIsActive()
public
getIsActive() : bool
Return values
boolgetIsVisible()
public
getIsVisible([int $_default = 0 ]) : int
Parameters
- $_default : int = 0
Return values
intgetLastLaunch()
public
getLastLaunch() : mixed
getLinkData()
public
getLinkData([array<string|int, mixed> &$_data = array('node' => array(), 'link' => array()) ][, int $_level = 0 ][, null|int $_drill = null ]) : array<string|int, mixed>
Parameters
- $_data : array<string|int, mixed> = array('node' => array(), 'link' => array())
- $_level : int = 0
- $_drill : null|int = null
Return values
array<string|int, mixed>getLinkToConfiguration()
public
getLinkToConfiguration() : mixed
getLog()
public
getLog() : string
Return values
stringgetMode()
public
getMode() : mixed
getName()
public
getName() : string
Return values
stringgetObject()
public
getObject() : object
Return values
objectgetObject_id()
public
getObject_id([mixed $_default = null ]) : mixed
Parameters
- $_default : mixed = null
getOrder()
public
getOrder() : mixed
getPID()
public
getPID() : mixed
getReturn()
getReturn
public
getReturn() : bool
Return values
boolgetScenarioElement()
public
getScenarioElement() : mixed
getSchedule()
public
getSchedule() : string|object
Return values
string|objectgetState()
public
getState() : mixed
getTag()
public
getTag(mixed $_key[, mixed $_default = '' ]) : mixed
Parameters
- $_key : mixed
- $_default : mixed = ''
getTags()
getTags
public
getTags() : array<string|int, mixed>
Return values
array<string|int, mixed>getTemplate()
public
static getTemplate() : mixed
getTimeout()
public
getTimeout() : int
Return values
intgetTrigger()
public
getTrigger() : mixed
getUse()
public
getUse() : mixed
getUsedBy()
public
getUsedBy([mixed $_array = false ]) : mixed
Parameters
- $_array : mixed = false
hasRight()
public
hasRight(string $_right[, mixed $_user = null ]) : bool
Parameters
- $_right : string
- $_user : mixed = null
Return values
boolisDue()
public
isDue([mixed $_datetime = null ]) : bool
Parameters
- $_datetime : mixed = null
Return values
boollaunch()
public
launch([bool $_forceSyncMode = false ]) : bool
Parameters
- $_forceSyncMode : bool = false
Return values
boollistGroup()
public
static listGroup([string $_group = null ]) : array<string|int, scenario>
Parameters
- $_group : string = null
Return values
array<string|int, scenario>persistLog()
public
persistLog([mixed $_partial = false ]) : mixed
Parameters
- $_partial : mixed = false
postInsert()
public
postInsert() : mixed
preSave()
public
preSave() : mixed
Tags
refresh()
public
refresh() : mixed
remove()
public
remove() : mixed
removeData()
public
removeData(string $_key[, bool $_private = false ]) : bool
Parameters
- $_key : string
- $_private : bool = false
Return values
boolresetRepeatIfStatus()
public
resetRepeatIfStatus() : mixed
running()
public
running() : bool
Return values
boolsave()
public
save() : mixed
schedule()
public
static schedule() : array<string|int, scenario>
Return values
array<string|int, scenario>searchByTrigger()
public
static searchByTrigger(string $_search[, null|string $_options = null ][, bool $_and = true ]) : array<string|int, scenario>
Parameters
- $_search : string
- $_options : null|string = null
- $_and : bool = true
Return values
array<string|int, scenario>searchByUse()
public
static searchByUse(array<string|int, mixed> $searchs) : array<string|int, mixed>
Parameters
- $searchs : array<string|int, mixed>
Return values
array<string|int, mixed>setCache()
public
setCache(string $_key[, mixed $_value = null ]) : mixed
Parameters
- $_key : string
- $_value : mixed = null
setChanged()
public
setChanged(mixed $_changed) : mixed
Parameters
- $_changed : mixed
setConfiguration()
public
setConfiguration(string $_key, string $_value) : $this
Parameters
- $_key : string
- $_value : string
Return values
$thissetData()
public
setData(string $_key, string $_value[, bool $_private = false ]) : true
Parameters
- $_key : string
- $_value : string
- $_private : bool = false
Return values
truesetDescription()
public
setDescription(string $_description) : $this
Parameters
- $_description : string
Return values
$thissetDisplay()
public
setDisplay(string $_key, string $_value) : $this
Parameters
- $_key : string
- $_value : string
Return values
$thissetDo()
public
setDo(bool $_do) : $this
Parameters
- $_do : bool
Return values
$thissetGroup()
public
setGroup(mixed $_group) : $this
Parameters
- $_group : mixed
Return values
$thissetId()
public
setId(mixed $_id) : $this
Parameters
- $_id : mixed
Return values
$thissetIsActive()
public
setIsActive(mixed $_isActive) : $this
Parameters
- $_isActive : mixed
Return values
$thissetIsVisible()
public
setIsVisible(int $_isVisible) : $this
Parameters
- $_isVisible : int
Return values
$thissetLastLaunch()
public
setLastLaunch(string $lastLaunch) : mixed
Parameters
- $lastLaunch : string
setLog()
public
setLog(string $log) : mixed
Parameters
- $log : string
setMode()
public
setMode(mixed $_mode) : $this
Parameters
- $_mode : mixed
Return values
$thissetName()
public
setName(mixed $_name) : $this
Parameters
- $_name : mixed
Return values
$thissetObject_id()
public
setObject_id([mixed $object_id = null ]) : $this
Parameters
- $object_id : mixed = null
Return values
$thissetOrder()
public
setOrder(mixed $_order) : $this
Parameters
- $_order : mixed
Return values
$thissetPID()
public
setPID([mixed $pid = '' ]) : mixed
Parameters
- $pid : mixed = ''
setReturn()
public
setReturn(bool $_return) : $this
Parameters
- $_return : bool
Return values
$thissetScenarioElement()
public
setScenarioElement(mixed $_scenarioElement) : mixed
Parameters
- $_scenarioElement : mixed
setSchedule()
public
setSchedule(array<string|int, mixed>|string $_schedule) : $this
Parameters
- $_schedule : array<string|int, mixed>|string
Return values
$thissetState()
public
setState(string $state) : mixed
Parameters
- $state : string
setTags()
setTags
public
setTags(array<string|int, mixed> $_tags) : $this
Parameters
- $_tags : array<string|int, mixed>
Return values
$thissetTimeout()
public
setTimeout(string|int $_timeout) : $this
Parameters
- $_timeout : string|int
Return values
$thissetTrigger()
public
setTrigger(mixed $_trigger) : mixed
Parameters
- $_trigger : mixed
stop()
public
stop() : bool
Tags
Return values
booltestTrigger()
public
testTrigger(string $_event) : bool
Parameters
- $_event : string
Return values
booltoArray()
public
toArray() : mixed
toHtml()
public
toHtml(string $_version) : string
Parameters
- $_version : string
Return values
stringtoHumanReadable()
public
static toHumanReadable(string|object|array<string|int, mixed> $_input) : string|object|array<string|int, mixed>
Parameters
- $_input : string|object|array<string|int, mixed>