You are here

public function ContentHubEntityTypeConfig::isEnabledViewModes in Acquia Content Hub 8

Check if view modes are enabled.

Parameters

string $bundle: The entity bundle.

Return value

bool TRUE if enabled, FALSE otherwise.

Overrides ContentHubEntityTypeConfigInterface::isEnabledViewModes

2 calls to ContentHubEntityTypeConfig::isEnabledViewModes()
ContentHubEntityTypeConfig::calculateDependencies in src/Entity/ContentHubEntityTypeConfig.php
Calculates dependencies and stores them in the dependency property.
ContentHubEntityTypeConfig::calculateDependenciesForViewModes in src/Entity/ContentHubEntityTypeConfig.php
Calculate dependencies for view modes.

File

src/Entity/ContentHubEntityTypeConfig.php, line 79

Class

ContentHubEntityTypeConfig
Defines a ContentHubEntityTypeConfig configuration entity class.

Namespace

Drupal\acquia_contenthub\Entity

Code

public function isEnabledViewModes($bundle) {
  return !empty($this->bundles[$bundle]['enable_viewmodes']);
}