MentionsPluginManager.php in Open Social 10.1.x
Same filename and directory in other branches
- 8.9 modules/custom/mentions/src/MentionsPluginManager.php
- 8 modules/custom/mentions/src/MentionsPluginManager.php
- 8.2 modules/custom/mentions/src/MentionsPluginManager.php
- 8.3 modules/custom/mentions/src/MentionsPluginManager.php
- 8.4 modules/custom/mentions/src/MentionsPluginManager.php
- 8.5 modules/custom/mentions/src/MentionsPluginManager.php
- 8.6 modules/custom/mentions/src/MentionsPluginManager.php
- 8.7 modules/custom/mentions/src/MentionsPluginManager.php
- 8.8 modules/custom/mentions/src/MentionsPluginManager.php
- 10.3.x modules/custom/mentions/src/MentionsPluginManager.php
- 10.0.x modules/custom/mentions/src/MentionsPluginManager.php
- 10.2.x modules/custom/mentions/src/MentionsPluginManager.php
Namespace
Drupal\mentionsFile
modules/custom/mentions/src/MentionsPluginManager.phpView source
<?php
namespace Drupal\mentions;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\Core\Cache\CacheBackendInterface;
use Drupal\Core\Extension\ModuleHandlerInterface;
/**
* MentionsPluginManager for Mentions Type.
*/
class MentionsPluginManager extends DefaultPluginManager {
/**
* {@inheritdoc}
*/
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/Mentions', $namespaces, $module_handler, 'Drupal\\mentions\\MentionsPluginInterface', 'Drupal\\mentions\\Annotation\\Mention');
$this
->alterInfo('mentions_plugin_info');
$this
->setCacheBackend($cache_backend, 'mentions_plugins');
}
/**
* Get the names of plugins of type mentions_type.
*
* @return array
* A list of plugin names.
*/
public function getPluginNames() {
$definitions = $this
->getDefinitions();
$plugin_names = [];
foreach ($definitions as $definition) {
$name = $definition['name']
->getUntranslatedString();
$plugin_names[$definition['id']] = $name;
}
return $plugin_names;
}
}
Classes
Name | Description |
---|---|
MentionsPluginManager | MentionsPluginManager for Mentions Type. |