3 namespace Drupal\bootstrap_layouts\Plugin\BootstrapLayouts;
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;
12 interface BootstrapLayoutsUpdateInterface extends ContainerAwareInterface, ContainerFactoryPluginInterface, DerivativeInspectionInterface, PluginInspectionInterface {
15 * Retrieves the path to plugin provider.
18 * Path to the plugin provider.
20 public function getPath();
25 * @param \Drupal\bootstrap_layouts\BootstrapLayoutsManager $manager
26 * The BootstrapLayoutsManager instance.
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.
34 public function update(BootstrapLayoutsManager $manager, array $data = [], $display_messages = TRUE);
37 * Provide an update for an existing layout.
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.
43 * @param \Drupal\bootstrap_layouts\BootstrapLayout $layout
44 * The existing BootstrapLayout instance that is being processed.
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.
51 * @see \Drupal\bootstrap_layouts\BootstrapLayoutsManager::update()
53 public function processExistingLayout(BootstrapLayout $layout, array $data = [], $display_messages = TRUE);