Exemple #1
0
 /**
  * @param FieldRegistry $fields
  * @param IdentifiersProvider $identifiers
  */
 public function __construct(FieldRegistry $fields, IdentifiersProvider $identifiers)
 {
     parent::__construct($fields);
     $this->identifiers = $identifiers;
 }
Exemple #2
0
 function renderWithSelectedOption()
 {
     $parameter = new Parameter('foo', new EnumerationType(['foo', 'bar', 'baz'], new StringType()));
     $this->assert($this->field->render($parameter, 1), '<select name="foo" class="form-control">' . "\n" . '<option value="0">foo</option>' . "\n" . '<option value="1" selected="selected">bar</option>' . "\n" . '<option value="2">baz</option>' . "\n" . '</select>');
 }