Beispiel #1
0
 /**
  * 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');
     }
 }
Beispiel #2
0
 /**
  * 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');
 }
Beispiel #3
0
 /**
  * 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;
 }