public function __construct(AM_Controller_Action $oActionController, $sName, $iId) { $aControls = array(); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'identifer', 'UDID', array(array('require'), array('maxlen', 60))); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'user', 'User'); $aControls[] = new Volcano_Component_Control_Database_Static($oActionController, 'created', new Zend_Db_Expr('NOW()')); return parent::__construct($oActionController, $sName, $aControls, $oActionController->oDb, 'device', 'id', $iId); }
public function __construct(AM_Controller_Action $oActionController, $sName, $iId, $iClientId) { $this->iClientId = $iClientId; $aControls = array(); $aControls[] = new Volcano_Component_Control_Database_Static($oActionController, 'client', $iClientId); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'title', 'Title', array(array('require'))); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'type', 'Type', array(array('require'))); return parent::__construct($oActionController, $sName, $aControls, $oActionController->oDb, 'application', 'id', $iId); }
public function __construct(AM_Controller_Action $oActionController, $sName, $iIssueId, $iApplicationId) { $this->applicationId = $iApplicationId; $aControls = array(); $aUser = $oActionController->getUser(); if (!$iIssueId) { $aControls[] = new Volcano_Component_Control_Database_Static($oActionController, 'user', $aUser['id']); } return parent::__construct($oActionController, $sName, $aControls, $oActionController->oDb, 'issue', 'id', $iIssueId); }
public function __construct(AM_Controller_Action $oActionController, $sName, $iSubscriptionId, $iApplicationId) { $aControls = array(); $aControls[] = new Volcano_Component_Control_Database_Static($oActionController, 'application', $iApplicationId); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'itunes_id', 'Itunes id'); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'google_id', 'Google id'); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'button_title', 'Button title', array(array('require'))); $aControls[] = new Volcano_Component_Control_Database_Static($oActionController, 'updated', new Zend_Db_Expr('NOW()')); return parent::__construct($oActionController, $sName, $aControls, $oActionController->oDb, 'subscription', 'id', $iSubscriptionId); }
/** * * @param AM_Controller_Action $oActionController * @param string $sName * @param int $iRevisionId * @param int $iIssueId * @return void */ public function __construct(AM_Controller_Action $oActionController, $sName, $iRevisionId, $iIssueId) { $this->user = $oActionController->getUser(); $aControls = array(); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'title', 'Title', array(array('require')), 'title'); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'state', 'State', null, 'state'); $aControls[] = new Volcano_Component_Control($oActionController, 'copy_from', 'Copy from', array(array('integer'))); $aControls[] = new Volcano_Component_Control_Database_Static($oActionController, 'issue', $iIssueId); $aControls[] = new Volcano_Component_Control_Database_Static($oActionController, 'updated', new Zend_Db_Expr('NOW()')); if (!$iRevisionId) { $aControls[] = new Volcano_Component_Control_Database_Static($oActionController, 'user', $this->user['id']); } return parent::__construct($oActionController, $sName, $aControls, $oActionController->oDb, $sName, 'id', $iRevisionId); }
/** * * @param AM_Controller_Action $oActionController * @param string $sName * @param int $iUserId * @param int $iClientId * @return void */ public function __construct(AM_Controller_Action $oActionController, $sName, $iUserId, $iClientId) { $this->config = $oActionController->oConfig; if (!$iClientId) { $oQuery = $oActionController->oDb->select()->from('user', 'client')->where('id = ?', $iUserId); $iClientId = $oActionController->oDb->fetchOne($oQuery); } $aControls = array(); $aControls[] = new Volcano_Component_Control_Database_Static($oActionController, 'client', $iClientId); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'login', 'Login', array(array('require')), 'login'); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'first_name', 'First name', array(array('require')), 'first_name'); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'last_name', 'Last name', array(array('require')), 'last_name'); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'email', 'Email', array(array('require'), array('email')), 'email'); $aControls[] = new Volcano_Component_Control_Database_Password($oActionController, 'password', 'Password', array(array('require'))); $aControls[] = new Volcano_Component_Control_Password($oActionController, 'repeat_password', 'Confirm', array(array('require'))); return parent::__construct($oActionController, $sName, $aControls, $oActionController->oDb, 'user', 'id', $iUserId); }
/** * @param AM_Controller_Action $oActionController * @param string $sName * @param int $iId * @return viod */ public function __construct(AM_Controller_Action $oActionController, $sName, $iId) { $aControls = array(); $aControls[] = new Volcano_Component_Control_Database($oActionController, 'title', 'Name', array(array('require')), 'title'); return parent::__construct($oActionController, $sName, $aControls, $oActionController->oDb, 'client', 'id', $iId); }