/ */ class Content_Form_Element_ImageFile extends Content_Form_Element_File { /** * Extend parent to include image validator. */ public function init() { parent::init(); $this->addValidator( 'File_Extension', false, "gif, ico, jpg, jpeg, png, svg" ); } /** * Get the default display decorators to use when rendering * content elements of this type. * * @return array decorators configuration array suitable for passing * to element setDecorators(). */ public function getDefaultDisplayDecorators() { return array( array( 'decorator' => 'DisplayImage', 'options' => array( 'placement' => Content_Form_Decorator_DisplayImage::REPLACE ) ) ); } }