Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
facets
Commits
496f94c9
Commit
496f94c9
authored
Feb 28, 2016
by
Joris Vercammen
Browse files
CS fixes + typehint on interface
parent
7463fbb2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Plugin/facets/processor/ListItemProcessor.php
View file @
496f94c9
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\facets\Plugin\facets\processor
;
use
Drupal\Core\Config\ConfigManager
;
use
Drupal\Core\Config\ConfigManager
Interface
;
use
Drupal\Core\Plugin\ContainerFactoryPluginInterface
;
use
Drupal\facets\FacetInterface
;
use
Drupal\facets\FacetSource\SearchApiFacetSourceInterface
;
...
...
@@ -28,8 +28,11 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
* )
*/
class
ListItemProcessor
extends
ProcessorPluginBase
implements
BuildProcessorInterface
,
ContainerFactoryPluginInterface
{
/**
* @var \Drupal\Core\Entity\EntityTypeManager
* The config manager.
*
* @var \Drupal\Core\Config\ConfigManagerInterface
*/
private
$configManager
;
...
...
@@ -37,7 +40,7 @@ class ListItemProcessor extends ProcessorPluginBase implements BuildProcessorInt
/**
* {@inheritdoc}
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
$plugin_definition
,
ConfigManager
$config_manager
)
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
$plugin_definition
,
ConfigManager
Interface
$config_manager
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$plugin_definition
);
$this
->
configManager
=
$config_manager
;
...
...
@@ -67,7 +70,7 @@ class ListItemProcessor extends ProcessorPluginBase implements BuildProcessorInt
$index
=
$facet
->
getFacetSource
()
->
getIndex
();
$field
=
$index
->
getField
(
$field_identifier
);
$entity
=
str_replace
(
'entity:'
,
''
,
$field
->
getDatasourceId
());
$entity
=
str_replace
(
'entity:'
,
''
,
$field
->
getDatasourceId
());
}
$config_entity_name
=
sprintf
(
'field.storage.%s.%s'
,
$entity
,
$field_identifier
);
...
...
tests/src/Unit/Plugin/processor/LimitItemProcessorTest.php
View file @
496f94c9
...
...
@@ -13,7 +13,6 @@ use Drupal\facets\Result\Result;
use
Drupal\field\Entity\FieldStorageConfig
;
use
Drupal\Tests\UnitTestCase
;
use
Drupal\Core\Config\ConfigManager
;
use
Symfony\Component\DependencyInjection\ContainerBuilder
;
/**
* Unit test for processor.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment