/** * Constructor * * @param ObjectConfig $config An optional ObjectConfig object with configuration options. */ public function __construct(ObjectConfig $config) { parent::__construct($config); // Set the model identifier $this->_model = $config->model; if ($this->isDispatched()) { $this->attachBehavior('editable'); } }
/** * Constructor * * @param ObjectConfig $config Configuration options */ public function __construct(ObjectConfig $config) { parent::__construct($config); // Set the model identifier $this->setModel($config->model); //Fetch the entity before add, edit or delete $this->addCommandCallback('before.add', '_fetchEntity'); $this->addCommandCallback('before.edit', '_fetchEntity'); $this->addCommandCallback('before.delete', '_fetchEntity'); }
/** * Constructor * * @param ObjectConfig $config An optional ObjectConfig object with configuration options. */ public function __construct(ObjectConfig $config) { parent::__construct($config); // Set the model identifier $this->_model = $config->model; }