FormatterPluginManager.php in RESTful 7.2
File
src/Plugin/FormatterPluginManager.php
View source
<?php
namespace Drupal\restful\Plugin;
use Drupal\Core\Plugin\DefaultPluginManager;
use Drupal\plug\Util\Module;
class FormatterPluginManager extends DefaultPluginManager {
public function __construct(\Traversable $namespaces, \DrupalCacheInterface $cache_backend) {
parent::__construct('Plugin/formatter', $namespaces, 'Drupal\\restful\\Plugin\\formatter\\FormatterInterface', '\\Drupal\\restful\\Annotation\\Formatter');
$this
->setCacheBackend($cache_backend, 'formatter_plugins');
$this
->alterInfo('formatter_plugin');
}
public static function create($bin = 'cache') {
return new static(Module::getNamespaces(), _cache_get_object($bin));
}
}