public function init() { // Init form $this->setTitle('Profile Information'); $this->setIsCreation(true)->setItem(Engine_Api::_()->user()->getUser(null)); parent::init(); }
public function init() { // Init form $this->setTitle('Profile Information'); $this->setIsCreation(true)->setItem(Engine_Api::_()->user()->getUser(null)); parent::init(); $countriesAssoc = Engine_Api::_()->getDbTable('locations', 'user')->getLocationsAssoc(0); $countriesAssoc = array('0' => '') + $countriesAssoc; $request = Zend_Controller_Front::getInstance()->getRequest(); $provincesAssoc = array(); $country_id = $request->getParam('country_id', 0); if ($country_id) { $provincesAssoc = Engine_Api::_()->getDbTable('locations', 'user')->getLocationsAssoc($country_id); $provincesAssoc = array('0' => '') + $provincesAssoc; } $this->addElement('Select', 'country_id', array('label' => 'Country', 'multiOptions' => $countriesAssoc, 'value' => $country_id)); $citiesAssoc = array(); $province_id = $request->getParam('province_id', 0); if ($province_id) { $citiesAssoc = Engine_Api::_()->getDbTable('locations', 'user')->getLocationsAssoc($province_id); $citiesAssoc = array('0' => '') + $citiesAssoc; } $this->addElement('Select', 'province_id', array('label' => 'Province/State', 'multiOptions' => $provincesAssoc, 'value' => $province_id)); $city_id = $request->getParam('city_id', 0); $this->addElement('Select', 'city_id', array('label' => 'City', 'multiOptions' => $citiesAssoc, 'value' => $city_id)); $continent = ''; $country = Engine_Api::_()->getItem('user_location', $country_id); if ($country) { $continent = $country->getContinent(); } $this->addElement('Text', 'continent', array('label' => 'Continent', 'value' => $continent, 'disabled' => true)); }
public function init() { // custom classified fields if (!$this->_item) { $group = new Advgroup_Model_Group(array()); $this->setItem($group); } parent::init(); $this->removeElement('submit'); }
public function init() { // custom classified fields if (!$this->_item) { $review = new Ynmember_Model_Review(array()); $this->setItem($review); } parent::init(); $this->removeElement('submit'); }
public function init() { // custom classified fields if (!$this->_item) { $event = new Ynevent_Model_Event(array()); $this->setItem($event); } parent::init(); $this->removeElement('submit'); }
public function init() { // custom classified fields if (empty($this->_item)) { $idea = new Ynfeedback_Model_Idea(array()); $this->setItem($idea); } parent::init(); $this->removeElement('submit'); }
public function init() { // custom classified fields if (!$this->_item) { $classified_item = new Classified_Model_Classified(array()); $this->setItem($classified_item); } parent::init(); $this->removeElement('submit'); }
public function init() { parent::init(); $this->removeElement('submit'); }
public function init() { $this->setIsCreation(true)->setItem(Engine_Api::_()->user()->getUser(null)); parent::init(); }