예제 #1
0
 /**
  * Assemble validation rules
  *
  * @return array
  */
 protected function assembleValidationRules()
 {
     $rules = parent::assembleValidationRules();
     $rules[] = 'min[0]';
     $rules[] = 'max[65535]';
     return $rules;
 }
예제 #2
0
 /**
  * Assemble classes
  *
  * @param array $classes Classes
  *
  * @return array
  */
 protected function assembleClasses(array $classes)
 {
     $list = array_diff(parent::assembleClasses($classes), array('integer'));
     $list[] = 'with-infinity';
     $list[] = 'integer-with-infinity';
     return $list;
 }
예제 #3
0
 /**
  * Sanitize value
  *
  * @return mixed
  */
 protected function sanitize()
 {
     return '' !== $this->getValue() ? parent::sanitize() : '';
 }
예제 #4
0
 /**
  * Define widget params
  *
  * @return void
  */
 protected function defineWidgetParams()
 {
     parent::defineWidgetParams();
     $this->widgetParams[self::PARAM_MIN]->setValue(1970);
     $this->widgetParams[self::PARAM_MAX]->setValue(date('Y') + 1);
 }
예제 #5
0
 /**
  * Assemble classes
  *
  * @param array $classes Classes
  *
  * @return array
  */
 protected function assembleClasses(array $classes)
 {
     $classes = parent::assembleClasses($classes);
     $classes[] = 'cvc-number-field';
     return $classes;
 }
예제 #6
0
파일: Position.php 프로젝트: kingsj/core
 /**
  * Assemble classes
  *
  * @param array $classes Classes
  *
  * @return array
  */
 protected function assembleClasses(array $classes)
 {
     $list = parent::assembleClasses($classes);
     $list[] = 'no-wheel-mark';
     return $list;
 }