Inheritance: extends Input, implements FluidTYPO3\Flux\Form\FieldInterface
Example #1
0
 /**
  * @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;
 }
Example #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;
 }