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