You are here

public function ContentHubEntityTypeConfig::setPreviewImageField in Acquia Content Hub 8

Sets the preview image field for a specific bundle.

Parameters

string $bundle: The entity bundle.

string $image_field: The preview image field.

Overrides ContentHubEntityTypeConfigInterface::setPreviewImageField

File

src/Entity/ContentHubEntityTypeConfig.php, line 143

Class

ContentHubEntityTypeConfig
Defines a ContentHubEntityTypeConfig configuration entity class.

Namespace

Drupal\acquia_contenthub\Entity

Code

public function setPreviewImageField($bundle, $image_field) {
  if ($this
    ->isEnableIndex($bundle)) {
    $this->bundles[$bundle]['preview_image_field'] = $image_field;
  }
}