Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function normalize(NormalizerInterface $normalizer, $format = null, array $context = [])
 {
     return parent::normalize($normalizer, $format, $context) + ['maxlength' => $this->getValue()];
 }
Esempio n. 2
0
 /**
  * {@inheritdoc}
  */
 public function __construct(array $options = [])
 {
     parent::__construct($options);
     $this->min = $options['min'];
 }
Esempio n. 3
0
 /**
  * @param array $options
  */
 public function __construct(array $options = [])
 {
     parent::__construct($options);
     $this->constraints = ['min' => $this->createMin($options), 'max' => $this->createMax($options)];
 }
Esempio n. 4
0
 /**
  * {@inheritdoc}
  */
 public function __construct(array $options = [])
 {
     parent::__construct($options);
     $this->pattern = $options['pattern'];
 }
Esempio n. 5
0
 /**
  * {@inheritdoc}
  */
 public function __construct(array $options = [])
 {
     parent::__construct($options);
     $this->type = $options['type'];
 }