protected function PublicFieldInfoBase::validateInfo in RESTful 7.2
Validates the info section.
Parameters
array $section_info: The structured array with the section information.
Throws
ServerConfigurationException If the field does not pass validation.
1 call to PublicFieldInfoBase::validateInfo()
- PublicFieldInfoBase::validate in src/
Plugin/ resource/ Field/ PublicFieldInfo/ PublicFieldInfoBase.php - Validates the provided data for the section.
File
- src/
Plugin/ resource/ Field/ PublicFieldInfo/ PublicFieldInfoBase.php, line 173 - Contains \Drupal\restful\Plugin\resource\Field\PublicFieldInfo\PublicFieldInfoBase.
Class
Namespace
Drupal\restful\Plugin\resource\Field\PublicFieldInfoCode
protected function validateInfo(array $section_info) {
if (empty($section_info['label'])) {
throw new ServerConfigurationException(sprintf('The label information is missing for this field: %s.', $this->fieldName));
}
}