public static function provideMappings()
 {
     $ruleMapper = new ComponentRuleMapper();
     $tests = array();
     $test = function ($component, $rule) use(&$tests, $ruleMapper) {
         $tests[] = array($ruleMapper->createRule($rule), $component);
     };
     // delegates to typeRuleMapper
     $component = new IntegerField();
     $component->setType(Type::create('Id'));
     $test($component, 'Psc\\Form\\IdValidatorRule');
     $component = new TextField();
     $component->setType(Type::create('String'));
     $test($component, 'Psc\\Form\\NesValidatorRule');
     // eigene Componenten-Rules
     $component = new DatePicker();
     $component->init();
     $test($component, 'Psc\\Form\\DateValidatorRule');
     return $tests;
 }
Example #2
0
 public function getInnerHTML()
 {
     return parent::getInnerHTML()->addClass('datepicker-time');
 }
Example #3
0
 public function getInnerHTML()
 {
     $textField = parent::getInnerHTML();
     $textField->setAttribute('type', 'password');
     return $textField;
 }