Esempio n. 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');
     }
 }
Esempio n. 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');
 }
Esempio n. 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;
 }