상속: extends Input, implements FluidTYPO3\Flux\Form\FieldInterface
예제 #1
0
파일: EmailPipe.php 프로젝트: kersten/flux
 /**
  * @return FieldInterface[]
  */
 public function getFormFields()
 {
     $fields = parent::getFormFields();
     $fields['subject'] = Input::create(array('type' => 'Input'))->setName('subject');
     $fields['body'] = Text::create(array('type' => 'Text'))->setName('body');
     $fields['receipent'] = Input::create(array('type' => 'Input'))->setName('recipient');
     $fields['sender'] = Input::create(array('type' => 'Input'))->setName('sender');
     return $fields;
 }
예제 #2
0
 /**
  * @return FieldInterface[]
  */
 public function getFormFields()
 {
     $severities = array(FlashMessage::OK => 'OK', FlashMessage::ERROR => 'ERROR', FlashMessage::NOTICE => 'NOTICE', FlashMessage::WARNING => 'WARNING');
     $fields = parent::getFormFields();
     $fields['message'] = Text::create(array('type' => 'Text'))->setName('message');
     $fields['title'] = Input::create(array('type' => 'Input'))->setName('title');
     /** @var Select $severity */
     $severity = Select::create(array('type' => 'Select'));
     $severity->setName('severity');
     $severity->setItems($severities);
     $severity->setDefault(FlashMessage::OK);
     $fields['severity'] = $severity;
     return $fields;
 }