/**
  * @param WPCF_Field_Definition $field_definition Must be a definition of a checkboxes field.
  */
 public function __construct($field_definition)
 {
     parent::__construct($field_definition);
     if ($field_definition->get_type()->get_slug() != WPCF_Field_Definition::TYPE_CHECKBOXES) {
         throw new InvalidArgumentException('Wrong field definition type.');
     }
 }
Esempio n. 2
0
 /**
  * @param WPCF_Field_Definition $field_definition Must be a definition of a checkboxes field.
  */
 public function __construct($field_definition)
 {
     parent::__construct($field_definition);
     if ($field_definition->get_type()->get_slug() != Types_Field_Type_Definition_Factory::CHECKBOXES) {
         throw new InvalidArgumentException('Wrong field definition type.');
     }
 }