You are here

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

Class

PublicFieldInfoBase

Namespace

Drupal\restful\Plugin\resource\Field\PublicFieldInfo

Code

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