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
 /**
  * @return Type
  */
 public function type() : Type
 {
     return Type::decimal();
 }
Exemplo n.º 3
0
 /**
  * @return Type
  */
 public function type() : Type
 {
     return Type::integer();
 }
Exemplo n.º 4
0
 /**
  * @return Type
  */
 public function type() : Type
 {
     return Type::association();
 }
Exemplo n.º 5
0
 /**
  * @param Type $type
  *
  * @return bool
  */
 public function maps(Type $type) : bool
 {
     return Type::float()->isEqual($type);
 }
Exemplo n.º 6
0
 /**
  * @param Type $type
  *
  * @return bool
  */
 public function maps(Type $type) : bool
 {
     return $this->type->isEqual($type);
 }
Exemplo n.º 7
0
 /**
  * @return Type
  */
 public function type() : Type
 {
     return Type::text();
 }
Exemplo n.º 8
0
 /**
  * @param Type $type
  * @return bool
  */
 public function maps(Type $type) : bool
 {
     return Type::dateTime()->isEqual($type);
 }
Exemplo n.º 9
0
 /**
  * @param Type $type
  *
  * @return bool
  */
 public function maps(Type $type) : bool
 {
     return Type::integer()->isEqual($type);
 }
Exemplo n.º 10
0
 /**
  * @return Type
  */
 public function type() : Type
 {
     return Type::float();
 }
Exemplo n.º 11
0
 /**
  * @return Type
  */
 public function type() : Type
 {
     return Type::map();
 }
Exemplo n.º 12
0
 /**
  * @return Type
  */
 public function type() : Type
 {
     return Type::dateTime();
 }
Exemplo n.º 13
0
 /**
  * @param Type $type
  *
  * @return bool
  */
 public function maps(Type $type) : bool
 {
     return Type::decimal()->isEqual($type);
 }
Exemplo n.º 14
0
 /**
  * @return Type
  */
 public function type() : Type
 {
     return Type::bool();
 }