Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / diff / diff.api.php
1 <?php
2
3 /**
4  * @file
5  * Hooks and documentation related to diff module.
6  */
7
8 /**
9  * @defgroup diff Diff API
10  *
11  * @{
12  * Diff module provides a new plugin type, which determines how entity fields
13  * are mapped into strings which are then compared by the Diff component.
14  *
15  * Field diff builders are plugins annotated with class
16  * \Drupal\diff\Annotation\FieldDiffBuilder, and implement plugin interface
17  * \Drupal\diff\FieldDiffBuilderInterface. Field diff builders plugins are
18  * managed by the \Drupal\diff\DiffBuilderManager class. Field diff builders
19  * classes usually extend base class \Drupal\diff\FieldDiffBuilderBase and need
20  * to be in the namespace \Drupal\{your_module}\Plugin\diff\Field\. See the
21  * @link plugin_api Plugin API topic @endlink for more information on how to
22  * define plugins.
23  *
24  * @} End of "defgroup diff".
25  */
26
27 /**
28  * @addtogroup hooks
29  * @{
30  */
31
32 /**
33  * Alter the information provided in \Drupal\diff\Annotation\FieldDiffBuilder.
34  *
35  * @param array $diff_builders
36  *   The array of field diff builders plugins, keyed on the machine-readable
37  *    plugin name.
38  */
39 function hook_field_diff_builder_info_alter(array &$diff_builders) {
40   // Set a new label for the text_field_diff_builder plugin
41   // instead of the one provided in the annotation.
42   $diff_builders['text_field_diff_builder']['label'] = t('New label');
43 }
44
45 /**
46  * Alter the information provided in \Drupal\diff\Annotation\DiffLayoutBuilder.
47  *
48  * @param array $diff_layouts
49  *   The array of diff layout builders plugins, keyed on the machine-readable
50  *    plugin name.
51  */
52 function hook_diff_layout_builder_info_alter(array &$diff_layouts) {
53   // Set a new label for the text_field_diff_builder plugin
54   // instead of the one provided in the annotation.
55   $diff_layouts['my_layout']['label'] = t('New label');
56 }
57
58 /**
59  * @} End of "addtogroup hooks".
60  */