You are here

protected function InstallHelper::getMediaImageId in Drupal 8

Same name and namespace in other branches
  1. 9 core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php \Drupal\demo_umami_content\InstallHelper::getMediaImageId()
  2. 10 core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php \Drupal\demo_umami_content\InstallHelper::getMediaImageId()

Retrieves the Media Image ID of a media image saved during the import process.

Parameters

int $media_image_csv_id: The media image's ID from the CSV file.

Return value

int Media Image ID, or 0 if Media Image ID could not be found.

4 calls to InstallHelper::getMediaImageId()
InstallHelper::processArticle in core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php
Process article data into article node structure.
InstallHelper::processBannerBlock in core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php
Process block_banner data into block_banner block structure.
InstallHelper::processFooterPromoBlock in core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php
Process footer_block data into footer_block block structure.
InstallHelper::processRecipe in core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php
Process recipe data into recipe node structure.

File

core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php, line 249

Class

InstallHelper
Defines a helper class for importing default content.

Namespace

Drupal\demo_umami_content

Code

protected function getMediaImageId($media_image_csv_id) {
  if (array_key_exists($media_image_csv_id, $this->mediaImageIdMap)) {
    return $this->mediaImageIdMap[$media_image_csv_id];
  }
  return 0;
}