You are here

public function ExtendedFieldComparatorObserver::getInfo in Changed Fields API 8.3

Same name and namespace in other branches
  1. 8.2 examples/changed_fields_extended_field_comparator/src/ExtendedFieldComparatorObserver.php \Drupal\changed_fields_extended_field_comparator\ExtendedFieldComparatorObserver::getInfo()

Returns info for field comparator plugins.

Info is an associative array of entity types with their bundles and fields for watching.

Return value

array Array of entity types/bundles with field names for watching.

Overrides ObserverInterface::getInfo

File

examples/changed_fields_extended_field_comparator/src/ExtendedFieldComparatorObserver.php, line 15

Class

ExtendedFieldComparatorObserver
Implementation of an example observer.

Namespace

Drupal\changed_fields_extended_field_comparator

Code

public function getInfo() {
  return [
    'node' => [
      'article' => [
        'title',
        'body',
      ],
    ],
    'user' => [
      'user' => [
        'name',
        'mail',
      ],
    ],
    'taxonomy_term' => [
      'tags' => [
        'name',
        'description',
      ],
    ],
    'comment' => [
      'comment' => [
        'subject',
        'comment_body',
      ],
    ],
    'shortcut' => [
      'default' => [
        'title',
        'link',
      ],
    ],
    'menu_link_content' => [
      'menu_link_content' => [
        'title',
        'link',
      ],
    ],
    'media' => [
      'image' => [
        'name',
        'field_media_image',
      ],
    ],
    'block_content' => [
      'basic' => [
        'info',
        'body',
      ],
    ],
    'aggregator_feed' => [
      'aggregator_feed' => [
        'title',
        'refresh',
      ],
    ],
  ];
}