comparison core/lib/Drupal/Core/Config/ConfigEvents.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 namespace Drupal\Core\Config;
4
5 /**
6 * Defines events for the configuration system.
7 *
8 * @see \Drupal\Core\Config\ConfigCrudEvent
9 */
10 final class ConfigEvents {
11
12 /**
13 * Name of the event fired when saving a configuration object.
14 *
15 * This event allows modules to perform an action whenever a configuration
16 * object is saved. The event listener method receives a
17 * \Drupal\Core\Config\ConfigCrudEvent instance.
18 *
19 * See hook_update_N() documentation for safe configuration API usage and
20 * restrictions as this event will be fired when configuration is saved by
21 * hook_update_N().
22 *
23 * @Event
24 *
25 * @see \Drupal\Core\Config\ConfigCrudEvent
26 * @see \Drupal\Core\Config\Config::save()
27 * @see \Drupal\Core\Config\ConfigFactory::onConfigSave()
28 * @see hook_update_N()
29 *
30 * @var string
31 */
32 const SAVE = 'config.save';
33
34 /**
35 * Name of the event fired when deleting a configuration object.
36 *
37 * This event allows modules to perform an action whenever a configuration
38 * object is deleted. The event listener method receives a
39 * \Drupal\Core\Config\ConfigCrudEvent instance.
40 *
41 * See hook_update_N() documentation for safe configuration API usage and
42 * restrictions as this event will be fired when configuration is deleted by
43 * hook_update_N().
44 *
45 * @Event
46 *
47 * @see \Drupal\Core\Config\ConfigCrudEvent
48 * @see \Drupal\Core\Config\Config::delete()
49 * @see \Drupal\Core\Config\ConfigFactory::onConfigDelete()
50 * @see hook_update_N()
51 *
52 * @var string
53 */
54 const DELETE = 'config.delete';
55
56 /**
57 * Name of the event fired when renaming a configuration object.
58 *
59 * This event allows modules to perform an action whenever a configuration
60 * object's name is changed. The event listener method receives a
61 * \Drupal\Core\Config\ConfigRenameEvent instance.
62 *
63 * See hook_update_N() documentation for safe configuration API usage and
64 * restrictions as this event will be fired when configuration is renamed by
65 * hook_update_N().
66 *
67 * @Event
68 *
69 * @see \Drupal\Core\Config\ConfigRenameEvent
70 * @see \Drupal\Core\Config\ConfigFactoryInterface::rename()
71 * @see hook_update_N()
72 *
73 * @var string
74 */
75 const RENAME = 'config.rename';
76
77 /**
78 * Name of the event fired when validating imported configuration.
79 *
80 * This event allows modules to perform additional validation operations when
81 * configuration is being imported. The event listener method receives a
82 * \Drupal\Core\Config\ConfigImporterEvent instance.
83 *
84 * @Event
85 *
86 * @see \Drupal\Core\Config\ConfigImporterEvent
87 * @see \Drupal\Core\Config\ConfigImporter::validate().
88 * @see \Drupal\Core\EventSubscriber\ConfigImportSubscriber::onConfigImporterValidate().
89 *
90 * @var string
91 */
92 const IMPORT_VALIDATE = 'config.importer.validate';
93
94 /**
95 * Name of the event fired when importing configuration to target storage.
96 *
97 * This event allows modules to perform additional actions when configuration
98 * is imported. The event listener method receives a
99 * \Drupal\Core\Config\ConfigImporterEvent instance.
100 *
101 * @Event
102 *
103 * @see \Drupal\Core\Config\ConfigImporterEvent
104 * @see \Drupal\Core\Config\ConfigImporter::import().
105 * @see \Drupal\Core\EventSubscriber\ConfigSnapshotSubscriber::onConfigImporterImport().
106 *
107 * @var string
108 */
109 const IMPORT = 'config.importer.import';
110
111 /**
112 * Name of event fired when missing content dependencies are detected.
113 *
114 * Events subscribers are fired as part of the configuration import batch.
115 * Each subscribe should call
116 * \Drupal\Core\Config\MissingContentEvent::resolveMissingContent() when they
117 * address a missing dependency. To address large amounts of dependencies
118 * subscribers can call
119 * \Drupal\Core\Config\MissingContentEvent::stopPropagation() which will stop
120 * calling other events and guarantee that the configuration import batch will
121 * fire the event again to continue processing missing content dependencies.
122 *
123 * @see \Drupal\Core\Config\ConfigImporter::processMissingContent()
124 * @see \Drupal\Core\Config\MissingContentEvent
125 */
126 const IMPORT_MISSING_CONTENT = 'config.importer.missing_content';
127
128 /**
129 * Name of event fired to collect information on all config collections.
130 *
131 * This event allows modules to add to the list of configuration collections
132 * retrieved by \Drupal\Core\Config\ConfigManager::getConfigCollectionInfo().
133 * The event listener method receives a
134 * \Drupal\Core\Config\ConfigCollectionInfo instance.
135 *
136 * @Event
137 *
138 * @see \Drupal\Core\Config\ConfigCollectionInfo
139 * @see \Drupal\Core\Config\ConfigManager::getConfigCollectionInfo()
140 * @see \Drupal\Core\Config\ConfigFactoryOverrideBase
141 *
142 * @var string
143 */
144 const COLLECTION_INFO = 'config.collection_info';
145
146 }