Dumplie\Metadata\Schema\Type::text PHP Method

text() public static method

public static text ( ) : Type
return Type
    public static function text() : Type
    {
        return new static(static::TYPE_TEXT);
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @param FormBuilderInterface $builder
  * @param array $options
  */
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     /* @var TypeSchema $typeSchema */
     $typeSchema = $options['mao']->typeSchema();
     foreach ($typeSchema->getDefinitions() as $fieldName => $definition) {
         switch ((string) $definition->type()) {
             case Type::text():
                 $this->buildTextType($builder, $options, $fieldName, $definition);
                 break;
             case Type::bool():
                 $this->buildBoolType($builder, $options, $fieldName, $definition);
                 break;
         }
     }
 }
All Usage Examples Of Dumplie\Metadata\Schema\Type::text