You are here

ImageFieldDiffParser.php in Entity Share 8.3

File

modules/entity_share_diff/src/Plugin/DiffGenerator/ImageFieldDiffParser.php
View source
<?php

declare (strict_types=1);
namespace Drupal\entity_share_diff\Plugin\DiffGenerator;


/**
 * Plugin to diff image fields.
 *
 * @DiffGenerator(
 *   id = "image_field_diff_parser",
 *   label = @Translation("Image Field Diff Parser"),
 *   field_types = {
 *     "image"
 *   },
 * )
 */
class ImageFieldDiffParser extends FileFieldDiffParser {

  /**
   * {@inheritdoc}
   */
  protected function getFieldMetaProperties() {
    return [
      'alt' => (string) $this
        ->t('Alt'),
      'title' => (string) $this
        ->t('Image title'),
    ];
  }

}

Classes

Namesort descending Description
ImageFieldDiffParser Plugin to diff image fields.