Example #1
0
 /**
  * Constructor
  *
  * Registers form view helper as decorator
  *
  * @param mixed $options
  * @return void
  */
 public function __construct($options = null)
 {
     Centurion_Traits_Common::initTraits($this);
     parent::__construct($options);
 }
Example #2
0
 public function __construct($config = array())
 {
     if (null === $this->_name) {
         $this->_name = Centurion_Inflector::tableize(str_replace('_Model_DbTable_', '', get_class($this)));
     }
     Centurion_Signal::factory('pre_init')->send($this);
     parent::__construct($config);
     $this->_config = $config;
     if (null === $this->_meta) {
         $this->_setupMeta();
     }
     Centurion_Traits_Common::initTraits($this);
     Centurion_Signal::factory('post_init')->send($this);
 }
Example #3
0
 public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
 {
     parent::__construct($request, $response, $invokeArgs);
     Centurion_Traits_Common::initTraits($this);
 }
Example #4
0
 public function __construct(array $config)
 {
     parent::__construct($config);
     Centurion_Traits_Common::initTraits($this);
 }
Example #5
0
 /**
  * Constructor
  *
  * @param   array|Zend_Config           $options    Options
  * @param   Centurion_Db_Table_Row_Abstract $instance   Instance attached to the form
  * @return void
  */
 public function __construct($options, Centurion_Db_Table_Row_Abstract $instance = null)
 {
     if (!$this->_modelClassName || !is_string($this->_modelClassName)) {
         // @todo: below if statement is maintained for BC but it might be useless
         if (!$this->_model || !$this->_model instanceof Centurion_Db_Table_Abstract) {
             throw new Centurion_Exception("Empty or invalid property _modelClassName");
         }
     }
     Centurion_Traits_Common::initTraits($this);
     $this->addElementPrefixPath('Centurion_Form_Decorator', 'Centurion/Form/Decorator/', 'decorator');
     $this->_preGenerate();
     if (is_array($options)) {
         $this->setOptions($options);
     } elseif ($options instanceof Zend_Config) {
         $this->setConfig($options);
     }
     $this->addElements($this->_columnToElements());
     if (!defined('PHPUNIT') || PHPUNIT == false) {
         $this->addElement('Hash', '_XSRF', array('salt' => $this->getAttrib('id')));
     }
     // Extensions...
     $this->init();
     $this->loadDefaultDecorators();
     $this->setInstance($instance);
     $this->_postGenerate();
 }