You are here

public function ContentHubEntityTypeConfig::setPreviewImageStyle in Acquia Content Hub 8

Sets the preview image style for a specific bundle.

Parameters

string $bundle: The entity bundle.

string $image_style: The preview image style.

Overrides ContentHubEntityTypeConfigInterface::setPreviewImageStyle

File

src/Entity/ContentHubEntityTypeConfig.php, line 157

Class

ContentHubEntityTypeConfig
Defines a ContentHubEntityTypeConfig configuration entity class.

Namespace

Drupal\acquia_contenthub\Entity

Code

public function setPreviewImageStyle($bundle, $image_style) {
  if ($this
    ->isEnableIndex($bundle)) {
    $this->bundles[$bundle]['preview_image_style'] = $image_style;
  }
}