'y'); protected function _initElements() { parent::_initElements(); $dataObj = new App_People_Admin_Obj(); $image = $dataObj->getConfig('image')->toArray(); $shortBioLength = $dataObj->getConfig('shortBioLength'); $this->addElement('text', 'name', array('label' => 'Name', 'required' => true)); $this->addSeoGroup('People', 'name'); $this->addElement( 'extendedImage', 'image', array( 'label' => 'Photo', 'resize' => $image['width'] . 'x' . $image['height'] . $image['resizeMethodAlias'], 'thumbnailWidth' => $image['width'], 'thumbnailHeight' => $image['height'] ) ); $this->addElement('text', 'jobTitle', array('label' => 'Job Title', 'required' => true)); $this->addElement('email', 'email', array('label' => 'Email')); $this->addElement('phone', 'phone', array('label' => 'Phone')); $this->addElement( 'textarea', 'shortBio', array( 'label' => 'Short Bio', 'rows' => 5, 'description' => 'Text space is limited to '. $shortBioLength . ' characters.' ) ); $validatorOptions = array( 'max' => $shortBioLength, 'elementLabel' => $this->getElement('shortBio')->getLabel(), ); $this->getElement('shortBio')->addValidator('StringLength', true, array($validatorOptions)); $this->addElement('htmlEditor', 'fullBio', array('label' => 'Full Bio', 'required' => true)); $socialLinks = \App_People_Admin_Obj::getSocialLinks(); foreach ($socialLinks as $socialLink) { $this->addElement( 'text', 'socialLink' . $socialLink['id'], array( 'label' => $socialLink['serviceName'] . ' Profile Link', 'validators' => array('Url'), 'description' => 'Example: ' . $socialLink['exampleLink'], ) ); } $this->addElement('checkbox', 'enabled', array('label' => 'Show on user end', 'decoration' => 'simple')); return $this; } }