You are here

public function ContentHubEntityTypeConfig::getRenderingViewModes in Acquia Content Hub 8

Obtains the list of rendering view modes.

Note this does not check whether the view modes are enabled so a previous check on that has to be done.

Parameters

string $bundle: The entity bundle.

Return value

array An array of rendering view modes.

Overrides ContentHubEntityTypeConfigInterface::getRenderingViewModes

1 call to ContentHubEntityTypeConfig::getRenderingViewModes()
ContentHubEntityTypeConfig::calculateDependenciesForViewModes in src/Entity/ContentHubEntityTypeConfig.php
Calculate dependencies for view modes.

File

src/Entity/ContentHubEntityTypeConfig.php, line 95

Class

ContentHubEntityTypeConfig
Defines a ContentHubEntityTypeConfig configuration entity class.

Namespace

Drupal\acquia_contenthub\Entity

Code

public function getRenderingViewModes($bundle) {
  return isset($this->bundles[$bundle]['rendering']) ? $this->bundles[$bundle]['rendering'] : [];
}