function 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.
File
-
core/
profiles/ demo_umami/ modules/ demo_umami_content/ src/ InstallHelper.php, line 246
Class
- InstallHelper
- Defines a helper class for importing default content.
Namespace
Drupal\demo_umami_contentCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.