ff8e99ecc0881171f580976f71be5809358aa76c
[yaffs-website] / web / modules / contrib / bootstrap_layouts / src / Plugin / BootstrapLayouts / BootstrapLayoutsUpdateInterface.php
1 <?php
2
3 namespace Drupal\bootstrap_layouts\Plugin\BootstrapLayouts;
4
5 use Drupal\bootstrap_layouts\BootstrapLayout;
6 use Drupal\bootstrap_layouts\BootstrapLayoutsManager;
7 use Drupal\Component\Plugin\DerivativeInspectionInterface;
8 use Drupal\Component\Plugin\PluginInspectionInterface;
9 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
10 use Symfony\Component\DependencyInjection\ContainerAwareInterface;
11
12 interface BootstrapLayoutsUpdateInterface extends ContainerAwareInterface, ContainerFactoryPluginInterface, DerivativeInspectionInterface, PluginInspectionInterface {
13
14   /**
15    * Retrieves the path to plugin provider.
16    *
17    * @return string
18    *   Path to the plugin provider.
19    */
20   public function getPath();
21
22   /**
23    * Provide an update.
24    *
25    * @param \Drupal\bootstrap_layouts\BootstrapLayoutsManager $manager
26    *   The BootstrapLayoutsManager instance.
27    * @param array $data
28    *   Any static YAML data found for the update.
29    * @param bool $display_messages
30    *   Flag determining whether a message will be displayed indicating whether
31    *   the layout was processed successfully or not.
32
33    */
34   public function update(BootstrapLayoutsManager $manager, array $data = [], $display_messages = TRUE);
35
36   /**
37    * Provide an update for an existing layout.
38    *
39    * Note: this process any existing layout and is not specific to just
40    * "Bootstrap Layouts" based layouts. If implementing this update, you should
41    * check the $layout->getId() before performing any tasks.
42    *
43    * @param \Drupal\bootstrap_layouts\BootstrapLayout $layout
44    *   The existing BootstrapLayout instance that is being processed.
45    * @param array $data
46    *   Any static YAML data found for the update.
47    * @param bool $display_messages
48    *   Flag determining whether a message will be displayed indicating whether
49    *   the layout was processed successfully or not.
50    *
51    * @see \Drupal\bootstrap_layouts\BootstrapLayoutsManager::update()
52    */
53   public function processExistingLayout(BootstrapLayout $layout, array $data = [], $display_messages = TRUE);
54
55 }