/**
   * {@inheritdoc}
   */
  public function addInstanceId($id, $configuration = NULL) {
    // @todo Open a core bug report, the parent class should take care of this..
    $this->instanceId = $id;
    $this->instanceIDs = array_filter($this->instanceIDs);

    parent::addInstanceId($id, $configuration);
  }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function getAliasType()
 {
     if (!$this->aliasTypeCollection) {
         $this->aliasTypeCollection = new DefaultSingleLazyPluginCollection(\Drupal::service('plugin.manager.alias_type'), $this->getType(), ['default' => $this->getPattern()]);
     }
     return $this->aliasTypeCollection->get($this->getType());
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 protected function initializePlugin($instance_id)
 {
     parent::initializePlugin($instance_id);
     $plugin_instance = $this->pluginInstances[$instance_id];
     if ($plugin_instance instanceof ConfigurableSearchPluginInterface) {
         $plugin_instance->setSearchPageId($this->searchPageId);
     }
 }
Ejemplo n.º 4
0
 /**
  * {@inheritdoc}
  */
 public function addInstanceId($id, $configuration = NULL)
 {
     $this->instanceId = $id;
     parent::addInstanceId($id, $configuration);
     if ($configuration !== NULL) {
         $this->setConfiguration($configuration);
     }
 }
Ejemplo n.º 5
0
 /**
  * {@inheritdoc}
  */
 protected function initializePlugin($instance_id)
 {
     if (!$instance_id) {
         throw new PluginException(String::format("The block '@block' did not specify a plugin.", array('@block' => $this->blockId)));
     }
     try {
         parent::initializePlugin($instance_id);
     } catch (PluginException $e) {
         $module = $this->configuration['provider'];
         // Ignore blocks belonging to disabled modules, but re-throw valid
         // exceptions when the module is enabled and the plugin is misconfigured.
         if (!$module || \Drupal::moduleHandler()->moduleExists($module)) {
             throw $e;
         }
     }
 }
Ejemplo n.º 6
0
 /**
  * {@inheritdoc}
  *
  * @return \Drupal\Core\Action\ActionInterface
  */
 public function &get($instance_id)
 {
     return parent::get($instance_id);
 }