protected function PublicFieldInfoBase::validate in RESTful 7.2
Validates the provided data for the section.
Parameters
string $section_name: The name of the categories. By default RESTful supports 'info', 'form_element' and 'data'.
array $section_info: The structured array with the section information.
Throws
ServerConfigurationException If the field does not pass validation.
1 call to PublicFieldInfoBase::validate()
- PublicFieldInfoBase::addCategory in src/
Plugin/ resource/ Field/ PublicFieldInfo/ PublicFieldInfoBase.php - Add categories to the field info.
File
- src/
Plugin/ resource/ Field/ PublicFieldInfo/ PublicFieldInfoBase.php, line 121 - Contains \Drupal\restful\Plugin\resource\Field\PublicFieldInfo\PublicFieldInfoBase.
Class
Namespace
Drupal\restful\Plugin\resource\Field\PublicFieldInfoCode
protected function validate($section_name, array $section_info) {
if ($section_name == 'info') {
$this
->validateInfo($section_info);
}
elseif ($section_name == 'data') {
$this
->validateData($section_info);
}
elseif ($section_name == 'form_element') {
$this
->validateFormElement($section_info);
}
}