/** * * @param AM_Controller_Action $oActionController * @param string $sName * @param int $iId * @param int $iClientId * @return void */ public function __construct(AM_Controller_Action $oActionController, $sName, $iId, $iClientId) { parent::__construct($oActionController, $sName, $iId, $iClientId); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'preview', 'Preview', array(array('numeric')))); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'description', 'Description', array(array('require')))); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'welcome', 'Welcome message', array(), 'welcome')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'welcome_part2', 'Welcome message under button', array(), 'welcome_part2')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'product_id', 'Product id', array(array('regexp', '/^[a-zA-Z0-9\\._]+$/')))); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nm_twitter_ios', 'Message')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nm_fbook_ios', 'Message')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nt_email_ios', 'Title')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nm_email_ios', 'Message')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nm_twitter_android', 'Message')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nm_fbook_android', 'Message')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nt_email_android', 'Title')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nm_email_android', 'Message')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'push_apple_enabled', 'Enable')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'push_boxcar_enabled', 'Enable')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'push_boxcar_provider_key', 'Key')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'push_boxcar_provider_secret', 'Secret')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'message_for_readers', 'For our readers')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'share_url', 'Share url')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'share_message', 'Share message', array(array('maximum length', 200)))); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'application_email', 'Application email')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'contact_email_subject', 'Contact email subject', array(array('maximum length', 200)))); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'contact_email_text', 'Contact email default text')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'subscribe_title', 'Subscribe popup title', array(), 'subscribe_title')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'subscribe_button', 'Subscribe button subtitle', array(), 'subscribe_button')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'application_password', 'Application password', array(), 'password')); $this->addControl(new Volcano_Component_Control_Database_Static($oActionController, 'updated', new Zend_Db_Expr('NOW()'))); $oApplication = AM_Model_Db_Table_Abstract::factory('application')->findOneBy('id', $iId); $sImageValue = !empty($oApplication->image) ? $oApplication->image : null; $this->addControl(new AM_Component_Control_Database_File($oActionController, 'newsstand_cover_image', 'Cover image', array(), 'newsstand_cover_image', AM_Tools::getContentPath(AM_Model_Db_Application::PRESET_APPLICATION_IMAGE) . DIRECTORY_SEPARATOR . '[ID]', TRUE, $sImageValue)); $this->postInitialize(); }
/** * * @param AM_Controller_Action $oActionController * @param string $sName * @param int $iId * @param int $iClientId * @return void */ public function __construct(AM_Controller_Action $oActionController, $sName, $iId, $iClientId) { parent::__construct($oActionController, $sName, $iId, $iClientId); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'preview', 'Preview', array(array('numeric')))); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'description', 'Description', array(array('require')))); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'product_id', 'Product id', array(array('regexp', '/^[a-zA-Z0-9\\._]+$/')))); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nm_twitter_ios', 'Message')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nm_fbook_ios', 'Message')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nt_email_ios', 'Title')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nm_email_ios', 'Message')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nm_twitter_android', 'Message')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nm_fbook_android', 'Message')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nt_email_android', 'Title')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'nm_email_android', 'Message')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'push_apple_enabled', 'Enable')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'push_boxcar_enabled', 'Enable')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'push_boxcar_provider_key', 'Key')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'push_boxcar_provider_secret', 'Secret')); $this->addControl(new Volcano_Component_Control_Database($oActionController, 'application_password', 'Application password', array(), 'password')); $this->addControl(new Volcano_Component_Control_Database_Static($oActionController, 'updated', new Zend_Db_Expr('NOW()'))); $this->postInitialize(); }
/** * * @param AM_Controller_Action $oActionController * @param string $sName * @param int $iId * @param int $iClientId * @return void */ public function __construct(AM_Controller_Action $oActionController, $sName, $iId, $iClientId) { parent::__construct($oActionController, $sName, $iId, $iClientId); $this->postInitialize(); }