You are here

public function PublicFieldInfoBase::getSection in RESTful 7.2

Gets the section.

Parameters

string $section_name: The name of the section. By default RESTful suports 'info', 'form_element' and 'data'.

Return value

array The structured array with the section information.

Overrides PublicFieldInfoInterface::getSection

1 call to PublicFieldInfoBase::getSection()
PublicFieldInfoBase::addSectionDefaults in src/Plugin/resource/Field/PublicFieldInfo/PublicFieldInfoBase.php
Merges default data in a section if it's not populated.

File

src/Plugin/resource/Field/PublicFieldInfo/PublicFieldInfoBase.php, line 95
Contains \Drupal\restful\Plugin\resource\Field\PublicFieldInfo\PublicFieldInfoBase.

Class

PublicFieldInfoBase

Namespace

Drupal\restful\Plugin\resource\Field\PublicFieldInfo

Code

public function getSection($section_name) {
  return empty($this->categories[$section_name]) ? array() : $this->categories[$section_name];
}