bool() public static method

public static bool ( ) : Type
return Type
Exemplo 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;
         }
     }
 }
Exemplo n.º 2
0
 /**
  * @param Type $type
  * @return bool
  */
 public function maps(Type $type) : bool
 {
     return Type::bool()->isEqual($type);
 }
Exemplo n.º 3
0
 /**
  * @return Type
  */
 public function type() : Type
 {
     return Type::bool();
 }