BootstrapLayoutsUpdateBase.php in Bootstrap Layouts 8.5
File
src/Plugin/BootstrapLayouts/BootstrapLayoutsUpdateBase.php
View source
<?php
namespace Drupal\bootstrap_layouts\Plugin\BootstrapLayouts;
use Drupal\bootstrap_layouts\BootstrapLayout;
use Drupal\bootstrap_layouts\BootstrapLayoutsManager;
use Drupal\Core\Plugin\PluginBase;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Symfony\Component\DependencyInjection\ContainerInterface;
class BootstrapLayoutsUpdateBase extends PluginBase implements BootstrapLayoutsUpdateInterface {
use ContainerAwareTrait;
protected $path;
public function __construct(array $configuration, $plugin_id, $plugin_definition, ContainerInterface $container = NULL) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
if (!isset($container)) {
$container = \Drupal::getContainer();
}
$this
->setContainer($container);
$this->path = drupal_get_path('module', $this->pluginDefinition['provider']) ?: drupal_get_path('theme', $this->pluginDefinition['provider']);
}
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container);
}
public function getPath() {
return $this->path;
}
public function update(BootstrapLayoutsManager $manager, array $data = [], $display_messages = TRUE) {
}
public function processExistingLayout(BootstrapLayout $layout, array $data = [], $display_messages = TRUE) {
}
}