Example #1
0
 /**
  * @param AM_Controller_Action $oActionController
  */
 public function __construct(AM_Controller_Action $oActionController)
 {
     $aControls = array();
     $aControls[] = new Volcano_Component_Control($oActionController, 'login', 'Login', array(array('require')));
     $aControls[] = new Volcano_Component_Control_Password($oActionController, 'password', 'Password', array(array('require')));
     parent::__construct($oActionController, 'component', $aControls);
 }
Example #2
0
 /**
  * Constructor
  *
  * @param AM_Controller_Action $actionController Controller
  * @param string $name Component name
  * @param array $controls List of controls
  * @param Zend_Db_Adapter_Abstract $db Database Link
  * @param string $tableName Name of binded table
  * @param string $primaryKeyName Name of primary key
  * @param string $primaryKeyValue Value of primary key. Must be null in record in insert mode
  */
 public function __construct(AM_Controller_Action $actionController, $name, array $controls, Zend_Db_Adapter_Abstract $db, $tableName, $primaryKeyName, $primaryKeyValue)
 {
     $this->db = $db;
     $this->primaryKeyValue = $primaryKeyValue;
     $this->primaryKeyName = $primaryKeyName;
     $this->tableName = $tableName;
     parent::__construct($actionController, $name, $controls);
 }
Example #3
0
 public function __construct(AM_Controller_Action $oActionController, $sName, $aParams)
 {
     $this->_aParams = $aParams;
     $this->_oDbAdapter = $oActionController->oDb;
     $aControls = array();
     foreach ($aParams['controls'] as $sKey => $aValue) {
         $sControlName = isset($aValue['name']) ? $aValue['name'] : $sKey;
         $aControls[] = new Volcano_Component_Control($oActionController, $sControlName, isset($aValue['title']) ? $aValue['title'] : ucfirst($sControlName), isset($aValue['rules']) ? $aValue['rules'] : null);
     }
     parent::__construct($oActionController, $sName, $aControls);
 }
Example #4
0
 /**
  * @param AM_Controller_Action     $oActionController
  * @param string $sName
  * @param AM_Component_Grid $oComponentGrid
  */
 public function __construct(AM_Controller_Action $oActionController, $sName, AM_Component_Grid $oComponentGrid)
 {
     $this->_oComponentGrid = $oComponentGrid;
     parent::__construct($oActionController, $sName, array());
 }