public function EntityDisplayBase::getComponents

Gets the display options for all components.

Return value

array The array of display options, keyed by component name.

Overrides EntityDisplayBaseInterface::getComponents

File

drupal/core/modules/entity/lib/Drupal/entity/EntityDisplayBase.php, line 163
Contains \Drupal\entity\EntityDisplayBase.

Class

EntityDisplayBase
Base class for config entity types that store configuration for entity forms and displays.

Namespace

Drupal\entity

Code

public function getComponents() {
  $result = array();
  foreach ($this->content as $name => $options) {
    if (!isset($options['visible']) || $options['visible'] === TRUE) {
      unset($options['visible']);
      $result[$name] = $options;
    }
  }
  return $result;
}