protected function _initObject($object) { parent::_initObject($object); // add to cache $key_name = $this->key; if ($object->{$key_name} && !key_exists($object->{$key_name}, $this->_objects)) { $this->_objects[$object->{$key_name}] = $object; } return $object; }
protected function _initObject($object) { parent::_initObject($object); // add to cache $key_name = $this->key; if ($object->{$key_name} && !key_exists($object->{$key_name}, $this->_objects)) { $this->_objects[$object->{$key_name}] = $object; } // trigger init event $this->app->event->dispatcher->notify($this->app->event->create($object, 'orderdev:init')); return $object; }
protected function _initObject($object) { parent::_initObject($object); // workaround for php bug, which calls constructor before filling values if (is_string($object->params) || is_null($object->params)) { // decorate data as object $object->params = $this->app->parameter->create($object->params); } // trigger init event $this->app->event->dispatcher->notify($this->app->event->create($object, 'submission:init')); return $object; }
protected function _initObject($object) { parent::_initObject($object); // workaround for php bug, which calls constructor before filling values if (is_string($object->params) || is_null($object->params)) { // decorate data as object $object->params = $this->app->parameter->create($object->params); } if (is_string($object->elements) || is_null($object->elements)) { // decorate data as object $object->elements = $this->app->data->create($object->elements); } // add to cache $key_name = $this->key; if ($object->{$key_name} && !key_exists($object->{$key_name}, $this->_objects)) { $this->_objects[$object->{$key_name}] = $object; } // trigger init event $this->app->event->dispatcher->notify($this->app->event->create($object, 'item:init')); return $object; }
protected function _initObject($object) { parent::_initObject($object); // workaround for php bug, which calls constructor before filling values if (is_string($object->params) || is_null($object->params)) { // decorate data as object $object->params = $this->app->parameter->create($object->params); } if (is_string($object->item_ids) || is_null($object->item_ids)) { $object->item_ids = isset($object->item_ids) ? explode(',', $object->item_ids) : array(); if (!empty($object->item_ids)) { $object->item_ids = array_combine($object->item_ids, $object->item_ids); } } // add to cache $key_name = $this->key; if ($object->{$key_name} && !key_exists($object->{$key_name}, $this->_objects)) { $this->_objects[$object->{$key_name}] = $object; } // trigger init event $this->app->event->dispatcher->notify($this->app->event->create($object, 'category:init')); return $object; }