Same name and namespace in other branches
  1. 8.x-2.x src/ExifContent.php \Drupal\exif\ExifContent::getBundleForExifData() 1 comment

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 in src/ExifContent.php
Allow to fill the title with exif data.
ExifContent::entity_insert_update in src/ExifContent.php
Main entry of the module.

File

src/ExifContent.php, line 77

Class

ExifContent
Class ExifContent make link between drupal content and file content.

Namespace

Drupal\exif

Code

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;
        }
    }
    return $new_types;
}