You are here

protected function PublicFieldInfoBase::validateData 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::validateData()
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 188
Contains \Drupal\restful\Plugin\resource\Field\PublicFieldInfo\PublicFieldInfoBase.

Class

PublicFieldInfoBase

Namespace

Drupal\restful\Plugin\resource\Field\PublicFieldInfo

Code

protected function validateData(array $section_info) {
  if (empty($section_info['type'])) {
    throw new ServerConfigurationException(sprintf('The schema information is not valid for this field: %s.', $this->fieldName));
  }
}