Commit 3b1d8a10 authored by Matthias Vandermaesen's avatar Matthias Vandermaesen

Changed: reshuffled sort plugins. Similar to how SearchApiBackend plugins are implemented.

parent f9c7e1fb
......@@ -2,7 +2,7 @@
/**
* @file
* Contains \Drupal\image\ImageEffectInterface.
* Contains \Drupal\facetapi\Sort\SortInterface.
*/
namespace Drupal\facetapi\Sort;
......@@ -14,7 +14,7 @@ use Drupal\Component\Plugin\ConfigurablePluginInterface;
*
* @see plugin_api
*/
interface FacetApiSortInterface extends PluginInspectionInterface {
interface SortInterface extends PluginInspectionInterface {
/**
* Returns the id of the facetapi sort.
......
<?php
/**
* @file
* Provides Drupal/Sort/FacetApiSortBase.
* Provides \Drupal\facetapi\SortPluginBase;
*/
namespace Drupal\facetapi\Sort;
use Drupal\Component\Plugin\PluginBase;
class FacetApiSortBase extends PluginBase implements FacetApiSortInterface {
class SortPluginBase extends PluginBase implements FacetApiSortInterface {
private $weight;
......
......@@ -2,7 +2,7 @@
/**
* @file
* Contains \Drupal\facetapi\FacetapiSortManager.
* Contains \Drupal\facetapi\Sort\SortPluginManager.
*/
namespace Drupal\facetapi\Sort;
......@@ -16,7 +16,7 @@ use Drupal\Core\Plugin\DefaultPluginManager;
*
* @see plugin_api
*/
class FacetApiSortManager extends DefaultPluginManager {
class SortPluginManager extends DefaultPluginManager {
/**
* Constructs a new FacetapiSortManager.
......@@ -30,8 +30,7 @@ class FacetApiSortManager extends DefaultPluginManager {
* The module handler.
*/
public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
parent::__construct('Plugin/Sort', $namespaces, $module_handler, 'Drupal\facetapi\FacetApiSortInterface', 'Drupal\facetapi\Annotation\FacetApiSort');
parent::__construct('Plugin/FacetApi/Sort', $namespaces, $module_handler, 'Drupal\facetapi\SortInterface', 'Drupal\facetapi\Annotation\FacetApiSort');
$this->alterInfo('facetapi_sort_info');
$this->setCacheBackend($cache_backend, 'facetapi_sort_plugins');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment