public function initElements()
    {
        $date = new \DateTime();
        $filename = 'metadata-' . $date->format('ymd');

        $nameElt = \tao_helpers_form_FormFactory::getElement('filename', 'Textbox');
        $nameElt->setDescription(__('File name'));
        $nameElt->setValue($filename);
        $nameElt->setUnit(".csv");
        $nameElt->addValidator(\tao_helpers_form_FormFactory::getValidator('NotEmpty'));
        $this->form->addElement($nameElt);

        $this->form->createGroup('options', __('Export metadata item'), array('xml_desc', 'filename', 'exportInstance'));
    }
public function initElements()
    {
        $date = new \DateTime();
        $filename = 'metadata-' . $date->format('ymd');

        $nameElt = \tao_helpers_form_FormFactory::getElement('filename', 'Textbox');
        $nameElt->setDescription(__('File name'));
        $nameElt->setValue($filename);
        $nameElt->setUnit(".csv");
        $nameElt->addValidator(\tao_helpers_form_FormFactory::getValidator('NotEmpty'));
        $this->form->addElement($nameElt);

        $this->form->createGroup('options', __('Export metadata item'), array('xml_desc', 'filename', 'exportInstance'));
    }
public function initElements ( ) { $ date = new \ DateTime ( ) ; $ filename = 'metadata-' . $ date -> format ( 'ymd' ) ; $ nameElt = \ tao_helpers_form_FormFactory :: getElement ( 'filename' , 'Textbox' ) ; $ nameElt -> setDescription ( __ ( 'File name' ) ) ; $ nameElt -> setValue ( $ filename ) ; $ nameElt -> setUnit ( ".csv" ) ; $ nameElt -> addValidator ( \ tao_helpers_form_FormFactory :: getValidator ( 'NotEmpty' ) ) ; $ this -> form -> addElement ( $ nameElt ) ; $ this -> form -> createGroup ( 'options' , __ ( 'Export metadata item' ) , array ( 'xml_desc' , 'filename' , 'exportInstance' ) ) ; }
Init filename field

@throws \common_Exception
Init filename field