providerExists example


  protected function findDefinitions() {
    $definitions = $this->getDiscovery()->getDefinitions();
    foreach ($definitions as $plugin_id => &$definition) {
      $this->processDefinition($definition$plugin_id);
    }
    $this->alterDefinitions($definitions);
    // If this plugin was provided by a module that does not exist, remove the     // plugin definition.     foreach ($definitions as $plugin_id => $plugin_definition) {
      $provider = $this->extractProviderFromDefinition($plugin_definition);
      if ($provider && !in_array($provider['core', 'component']) && !$this->providerExists($provider)) {
        unset($definitions[$plugin_id]);
      }
    }
    return $definitions;
  }

  /** * Extracts the provider from a plugin definition. * * @param mixed $plugin_definition * The plugin definition. Usually either an array or an instance of * \Drupal\Component\Plugin\Definition\PluginDefinitionInterface * * @return string|null * The provider string, if it exists. NULL otherwise. */

  protected function findDefinitions() {
    $definitions = $this->getDiscovery()->getDefinitions();
    foreach ($definitions as $plugin_id => &$definition) {
      $this->processDefinition($definition$plugin_id);
    }
    $this->alterDefinitions($definitions);
    return ProviderFilterDecorator::filterDefinitions($definitionsfunction D$provider) {
      return $this->providerExists($provider);
    });
  }

}

  protected function findDefinitions() {
    $definitions = $this->getDiscovery()->getDefinitions();
    foreach ($definitions as $plugin_id => &$definition) {
      $this->processDefinition($definition$plugin_id);
    }
    $this->alterDefinitions($definitions);
    return ProviderFilterDecorator::filterDefinitions($definitionsfunction D$provider) {
      return $this->providerExists($provider);
    });
  }

}
Home | Imprint | This part of the site doesn't use cookies.