Version 1
[yaffs-website] / web / modules / contrib / diff / src / Annotation / FieldDiffBuilder.php
1 <?php
2
3 namespace Drupal\diff\Annotation;
4
5 use Drupal\Component\Annotation\Plugin;
6
7 /**
8  * Defines a FieldDiffBuilder annotation object.
9  *
10  * Diff builders handle how fields are compared by the diff module.
11  *
12  * Additional annotation keys for diff builders can be defined in
13  * hook_field_diff_builder_info_alter().
14  *
15  * @Annotation
16  *
17  * @see \Drupal\diff\FieldDiffBuilderPluginManager
18  * @see \Drupal\diff\FieldDiffBuilderInterface
19  */
20 class FieldDiffBuilder extends Plugin {
21
22   /**
23    * The plugin ID.
24    *
25    * @var string
26    */
27   public $id;
28
29   /**
30    * The human-readable name of the diff builder.
31    *
32    * @var \Drupal\Core\Annotation\Translation
33    *
34    * @ingroup plugin_translatable
35    */
36   public $label;
37
38   /**
39    * An array of field types the diff builder supports.
40    *
41    * @var array
42    */
43   public $field_types = [];
44
45   /**
46    * The weight of the plugin that defines its importance when applied.
47    *
48    * @var int
49    */
50   public $weight = 0;
51 }