getConfig('image')->toArray(); $descriptionLength = (int) $this->getConfig('descriptionLength'); $this->addElement('static', 'albumTitle', array('label' => 'Album')); $this->addElement('text', 'title', array('label' => 'Title', 'required' => true, 'maxlength' => 255)); $resize = $imageCfg['width'] . 'x' . $imageCfg['height'] . Qs_ImageFs::getResizeMethodAlias($imageCfg['method']); $this->addElement( 'extendedImage', 'image', array( 'label' => 'Image', 'required' => true, 'resize' => $resize, /*'validators' => array( array('ImageSize', false, array('minwidth' => $imageCfg['width'])) )*/ ) ); $this->addElement( 'textarea', 'description', array( 'label' => 'Description', 'description' => 'Text space is limited to '. $descriptionLength . ' characters.' ) ); $this->getElement('description')->addValidator( 'StringLength', true, array('max' => $descriptionLength, 'elementLabel' => $this->getElement('description')->getLabel()) ); $this->addElement('checkbox', 'enabled', array('label' => 'Show on user end', 'decoration' => 'simple')); return $this; } }