Same name in other branches
- 8.x-1.x src/ExifContent.php \Drupal\exif\ExifContent::getBundleForExifData()
Check if this node type contains an image field.
Return value
array List of bundle where the exif data could be updated.
2 calls to ExifContent::getBundleForExifData()
- ExifContent::checkTitle dans src/
ExifContent.php - Allow to fill the title with exif data.
- ExifContent::entity_insert_update dans src/
ExifContent.php - Main entry of the module.
Fichier
-
src/
ExifContent.php, line 76
Classe
- ExifContent
- Class ExifContent make link between drupal content and file content.
Namespace
Drupal\exifCode
private function getBundleForExifData() {
$config = \Drupal::config('exif.settings');
$new_types = [];
// Fill up array with checked nodetypes.
foreach ($config->get('nodetypes') as $type) {
if ($type != "0") {
$new_types[] = $type;
}
}
foreach ($config->get('mediatypes') as $type) {
if ($type != "0") {
$new_types[] = $type;
}
}
foreach ($config->get('filetypes') as $type) {
if ($type != "0") {
$new_types[] = $type;
}
}
if (\Drupal::moduleHandler()->moduleExists('photos')) {
// Photos module integration.
$new_types[] = 'photos_image';
}
return $new_types;
}