PluginFlyvemdmPolicyBase - btry/glpi-plugin GitHub Wiki

PluginFlyvemdmPolicyBase

Properties

$unicityRequired

protected boolean $unicityRequired = true
  • Visibility: protected

$symbol

protected string $symbol
  • Visibility: protected

$group

protected string $group
  • Visibility: protected

$policyData

protected \PluginFlyvemdmPolicy $policyData
  • Visibility: protected

Methods

__construct

mixed PluginFlyvemdmPolicyInterface::__construct(\PluginFlyvemdmPolicy $policy)

Arguments

jsonDecodeProperties

array PluginFlyvemdmPolicyBase::jsonDecodeProperties(string $properties, array $defaultProperties)

JSON decode properties for the policy and merges them with default values

  • Visibility: protected

Arguments

  • $properties string
  • $defaultProperties array

canApply

mixed PluginFlyvemdmPolicyInterface::canApply(\PluginFlyvemdmFleet $fleet, string $value, string $itemtype, integer $itemId)

Check the policy may apply with respect of unicity constraint

Arguments

  • $fleet PluginFlyvemdmFleet
  • $value string
  • $itemtype string - <p>the itemtype of an item</p>
  • $itemId integer - <p>the id of an item</p>

unicityCheck

mixed PluginFlyvemdmPolicyInterface::unicityCheck(string $value, string $itemtype, integer $itemId, \PluginFlyvemdmFleet $fleet)

Check the unicity of the policy

Arguments

conflictCheck

mixed PluginFlyvemdmPolicyInterface::conflictCheck(string $value, string $itemtype, integer $itemId, \PluginFlyvemdmFleet $fleet)

Check there is not a conflict with an already applied policy

Arguments

integrityCheck

mixed PluginFlyvemdmPolicyInterface::integrityCheck(string $value, string $itemtype, integer $itemId)

Check the value used to apply a policy is valid, and check the the item to link

Arguments

  • $value string
  • $itemtype string - <p>the itemtype of an item</p>
  • $itemId integer - <p>the id of an item</p>

translateData

mixed PluginFlyvemdmPolicyInterface::translateData()

Translate type_data field

getGroup

string PluginFlyvemdmPolicyInterface::getGroup()

get the group the policy belongs to

apply

mixed PluginFlyvemdmPolicyInterface::apply(\PluginFlyvemdmFleet $fleet, string $value, $itemtype, $itemId)

Actions done before a policy is applied to a fleet

Arguments

unapply

mixed PluginFlyvemdmPolicyInterface::unapply(\PluginFlyvemdmFleet $fleet, string $value, $itemtype, $itemId)

Actions done after a policy is unapplied to a fleet

Arguments

showValueInput

mixed PluginFlyvemdmPolicyInterface::showValueInput()

return HTML input to set policy value

showValue

mixed PluginFlyvemdmPolicyInterface::showValue(\PluginFlyvemdmTask $task)

return policy value for display

Arguments

preprocessFormData

array PluginFlyvemdmPolicyInterface::preprocessFormData(array $input)

Transforms form data to match the format expected by the API

When using GLPI the form data send in a different structure comapred to the API This method converts it back to the format used in the API

Does nothing by default, override if needed

Arguments

  • $input array

filterStatus

mixed PluginFlyvemdmPolicyBase::filterStatus(string $status)

get a status from a device and filters it to update a task

  • Visibility: public

Arguments

  • $status string

getMqttMessage

array PluginFlyvemdmPolicyInterface::getMqttMessage(string $value, string $itemtype, integer $itemId)

Returns an array describing the policy applied vith the given value and item

Arguments

  • $value string
  • $itemtype string - <p>the itemtype of an item</p>
  • $itemId integer - <p>the id of an item</p>
⚠️ **GitHub.com Fallback** ⚠️