This commit is contained in:
Alex Solomaha
2016-11-27 16:27:08 +02:00
parent 2f51d56bb0
commit d38eff8589

View File

@@ -935,6 +935,7 @@ class Panel implements MessageComponentInterface
]);
if (!$event) {
$this->log("No event for this item [{$item->id}]");
return;
}
@@ -942,19 +943,18 @@ class Panel implements MessageComponentInterface
$task = $event->task;
foreach ($task->taskActions as $action) {
$this->doTaskAction($action, $item);
$this->doTaskAction($action);
}
}
/**
* @param TaskAction $action
* @param null $item
*/
private function doTaskAction($action, $item = null)
private function doTaskAction($action)
{
switch ($action->type) {
case TaskAction::TYPE_CHANGE_ITEM_VALUE:
$item = $item ? $item : $action->item;
$item = $action->item;
switch ($item->type) {
case Item::TYPE_SWITCH: