Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
932e4d9e
Commit
932e4d9e
authored
Feb 13, 2014
by
Alex Pott
Browse files
Issue
#2184231
by jibran, dawehner, Xano: Use ConfigFactoryInterface to type hint ConfigFactory.
parent
7009167f
Changes
82
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal.php
View file @
932e4d9e
...
...
@@ -266,7 +266,7 @@ public static function config($name) {
* factory. For example, changing the language, or turning all overrides on
* or off.
*
* @return \Drupal\Core\Config\ConfigFactory
* @return \Drupal\Core\Config\ConfigFactory
Interface
*/
public
static
function
configFactory
()
{
return
static
::
$container
->
get
(
'config.factory'
);
...
...
core/lib/Drupal/Core/Config/ConfigFactoryInterface.php
View file @
932e4d9e
...
...
@@ -26,8 +26,7 @@ interface ConfigFactoryInterface {
* @param bool $state
* TRUE if overrides should be applied, FALSE otherwise.
*
* @return \Drupal\Core\Config\ConfigFactory
* The config factory object.
* @return $this
*/
public
function
setOverrideState
(
$state
);
...
...
@@ -71,8 +70,7 @@ public function loadMultiple(array $names);
* (optional) The name of the configuration object to reset. If omitted, all
* configuration objects are reset.
*
* @return \Drupal\Core\Config\ConfigFactory
* The config factory object.
* @return $this
*/
public
function
reset
(
$name
=
NULL
);
...
...
@@ -114,8 +112,7 @@ public function getCacheKeys($name);
/**
* Clears the config factory static cache.
*
* @return \Drupal\Core\Config\ConfigFactory
* The config factory object.
* @return $this
*/
public
function
clearStaticCache
();
...
...
@@ -126,8 +123,7 @@ public function clearStaticCache();
* The language object to be set on the config factory. Used to override
* configuration by language.
*
* @return \Drupal\Core\Config\ConfigFactory
* The config factory object.
* @return $this
*/
public
function
setLanguage
(
Language
$language
=
NULL
);
...
...
@@ -139,8 +135,7 @@ public function setLanguage(Language $language = NULL);
* config factory to the site's default. The language can be used to
* override configuration data if language overrides are available.
*
* @return \Drupal\Core\Config\ConfigFactory
* The config factory object.
* @return $this
*/
public
function
setLanguageFromDefault
(
LanguageDefault
$language_default
);
...
...
core/lib/Drupal/Core/Config/ConfigInstaller.php
View file @
932e4d9e
...
...
@@ -15,7 +15,7 @@ class ConfigInstaller implements ConfigInstallerInterface {
/**
* The configuration factory.
*
* @var \Drupal\Core\Config\ConfigFactory
* @var \Drupal\Core\Config\ConfigFactory
Interface
*/
protected
$configFactory
;
...
...
@@ -50,7 +50,7 @@ class ConfigInstaller implements ConfigInstallerInterface {
/**
* Constructs the configuration installer.
*
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config_factory
* The configuration factory.
* @param \Drupal\Core\Config\StorageInterface $active_storage
* The active configuration storage.
...
...
@@ -61,7 +61,7 @@ class ConfigInstaller implements ConfigInstallerInterface {
* @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
* The event dispatcher.
*/
public
function
__construct
(
ConfigFactory
$config_factory
,
StorageInterface
$active_storage
,
TypedConfigManagerInterface
$typed_config
,
ConfigManagerInterface
$config_manager
,
EventDispatcherInterface
$event_dispatcher
)
{
public
function
__construct
(
ConfigFactory
Interface
$config_factory
,
StorageInterface
$active_storage
,
TypedConfigManagerInterface
$typed_config
,
ConfigManagerInterface
$config_manager
,
EventDispatcherInterface
$event_dispatcher
)
{
$this
->
configFactory
=
$config_factory
;
$this
->
activeStorage
=
$active_storage
;
$this
->
typedConfig
=
$typed_config
;
...
...
core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
View file @
932e4d9e
...
...
@@ -8,11 +8,11 @@
namespace
Drupal\Core\Config\Entity
;
use
Drupal\Component\Utility\String
;
use
Drupal\Core\Config\ConfigFactoryInterface
;
use
Drupal\Core\Entity\EntityInterface
;
use
Drupal\Core\Entity\EntityMalformedException
;
use
Drupal\Core\Entity\EntityStorageControllerBase
;
use
Drupal\Core\Config\Config
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\StorageInterface
;
use
Drupal\Core\Entity\EntityTypeInterface
;
use
Drupal\Core\Entity\EntityStorageException
;
...
...
@@ -61,7 +61,7 @@ class ConfigStorageController extends EntityStorageControllerBase implements Con
/**
* The config factory service.
*
* @var \Drupal\Core\Config\ConfigFactory
* @var \Drupal\Core\Config\ConfigFactory
Interface
*/
protected
$configFactory
;
...
...
@@ -84,7 +84,7 @@ class ConfigStorageController extends EntityStorageControllerBase implements Con
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* The entity type definition.
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config_factory
* The config factory service.
* @param \Drupal\Core\Config\StorageInterface $config_storage
* The config storage service.
...
...
@@ -93,7 +93,7 @@ class ConfigStorageController extends EntityStorageControllerBase implements Con
* @param \Drupal\Component\Uuid\UuidInterface $uuid_service
* The UUID service.
*/
public
function
__construct
(
EntityTypeInterface
$entity_type
,
ConfigFactory
$config_factory
,
StorageInterface
$config_storage
,
QueryFactory
$entity_query_factory
,
UuidInterface
$uuid_service
)
{
public
function
__construct
(
EntityTypeInterface
$entity_type
,
ConfigFactory
Interface
$config_factory
,
StorageInterface
$config_storage
,
QueryFactory
$entity_query_factory
,
UuidInterface
$uuid_service
)
{
parent
::
__construct
(
$entity_type
);
$this
->
idKey
=
$this
->
entityType
->
getKey
(
'id'
);
...
...
core/lib/Drupal/Core/Config/Entity/Query/Query.php
View file @
932e4d9e
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\Core\Config\Entity\Query
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Drupal\Core\Config\StorageInterface
;
use
Drupal\Core\Entity\EntityManagerInterface
;
use
Drupal\Core\Entity\Query\QueryBase
;
...
...
@@ -35,7 +35,7 @@ class Query extends QueryBase implements QueryInterface {
/**
* The config factory used by the config entity query.
*
* @var \Drupal\Core\Config\ConfigFactory
;
* @var \Drupal\Core\Config\ConfigFactory
Interface
*/
protected
$configFactory
;
...
...
@@ -51,10 +51,12 @@ class Query extends QueryBase implements QueryInterface {
* The entity manager that stores all meta information.
* @param \Drupal\Core\Config\StorageInterface $config_storage
* The actual config storage which is used to list all config items.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The config factory.
* @param array $namespaces
* List of potential namespaces of the classes belonging to this query.
*/
function
__construct
(
$entity_type
,
$conjunction
,
EntityManagerInterface
$entity_manager
,
StorageInterface
$config_storage
,
ConfigFactory
$config_factory
,
array
$namespaces
)
{
function
__construct
(
$entity_type
,
$conjunction
,
EntityManagerInterface
$entity_manager
,
StorageInterface
$config_storage
,
ConfigFactory
Interface
$config_factory
,
array
$namespaces
)
{
parent
::
__construct
(
$entity_type
,
$conjunction
,
$namespaces
);
$this
->
entityManager
=
$entity_manager
;
$this
->
configStorage
=
$config_storage
;
...
...
core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php
View file @
932e4d9e
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\Core\Config\Entity\Query
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Drupal\Core\Config\StorageInterface
;
use
Drupal\Core\Entity\EntityManagerInterface
;
use
Drupal\Core\Entity\Query\QueryBase
;
...
...
@@ -29,7 +29,7 @@ class QueryFactory implements QueryFactoryInterface {
/**
* The config factory used by the config entity query.
*
* @var \Drupal\Core\Config\ConfigFactory;
* @var \Drupal\Core\Config\ConfigFactory
Interface
;
*/
protected
$configFactory
;
...
...
@@ -45,10 +45,10 @@ class QueryFactory implements QueryFactoryInterface {
*
* @param \Drupal\Core\Config\StorageInterface $config_storage
* The config storage used by the config entity query.
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config_factory
* The config storage used by the config entity query.
*/
public
function
__construct
(
StorageInterface
$config_storage
,
ConfigFactory
$config_factory
)
{
public
function
__construct
(
StorageInterface
$config_storage
,
ConfigFactory
Interface
$config_factory
)
{
$this
->
configStorage
=
$config_storage
;
$this
->
configFactory
=
$config_factory
;
$this
->
namespaces
=
QueryBase
::
getNamespaces
(
$this
);
...
...
core/lib/Drupal/Core/Datetime/Date.php
View file @
932e4d9e
...
...
@@ -8,7 +8,7 @@
namespace
Drupal\Core\Datetime
;
use
Drupal\Component\Utility\Xss
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Drupal\Core\Datetime\DrupalDateTime
;
use
Drupal\Core\Entity\EntityManagerInterface
;
use
Drupal\Core\Language\Language
;
...
...
@@ -44,7 +44,7 @@ class Date {
/**
* The configuration factory.
*
* @var \Drupal\Core\Config\ConfigFactory
* @var \Drupal\Core\Config\ConfigFactory
Interface
*/
protected
$configFactory
;
...
...
@@ -79,10 +79,10 @@ class Date {
* The language manager.
* @param \Drupal\Core\StringTranslation\TranslationInterface $translation
* The string translation.
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config_factory
* The configuration factory.
*/
public
function
__construct
(
EntityManagerInterface
$entity_manager
,
LanguageManagerInterface
$language_manager
,
TranslationInterface
$translation
,
ConfigFactory
$config_factory
)
{
public
function
__construct
(
EntityManagerInterface
$entity_manager
,
LanguageManagerInterface
$language_manager
,
TranslationInterface
$translation
,
ConfigFactory
Interface
$config_factory
)
{
$this
->
dateFormatStorage
=
$entity_manager
->
getStorageController
(
'date_format'
);
$this
->
languageManager
=
$language_manager
;
$this
->
stringTranslation
=
$translation
;
...
...
core/lib/Drupal/Core/Extension/ThemeHandler.php
View file @
932e4d9e
...
...
@@ -10,7 +10,7 @@
use
Drupal\Component\Utility\String
;
use
Drupal\Core\Cache\Cache
;
use
Drupal\Core\Cache\CacheBackendInterface
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Drupal\Core\Config\ConfigInstallerInterface
;
use
Drupal\Core\Routing\RouteBuilder
;
use
Drupal\Core\SystemListingInfo
;
...
...
@@ -47,7 +47,7 @@ class ThemeHandler implements ThemeHandlerInterface {
/**
* The config factory to get the enabled themes.
*
* @var \Drupal\Core\Config\ConfigFactory
* @var \Drupal\Core\Config\ConfigFactory
Interface
*/
protected
$configFactory
;
...
...
@@ -96,7 +96,7 @@ class ThemeHandler implements ThemeHandlerInterface {
/**
* Constructs a new ThemeHandler.
*
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config_factory
* The config factory to get the enabled themes.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler to fire themes_enabled/themes_disabled hooks.
...
...
@@ -113,7 +113,7 @@ class ThemeHandler implements ThemeHandlerInterface {
* @param \Drupal\Core\SystemListingInfo $system_list_info
* (optional) The system listing info.
*/
public
function
__construct
(
ConfigFactory
$config_factory
,
ModuleHandlerInterface
$module_handler
,
CacheBackendInterface
$cache_backend
,
InfoParserInterface
$info_parser
,
ConfigInstallerInterface
$config_installer
=
NULL
,
RouteBuilder
$route_builder
=
NULL
,
SystemListingInfo
$system_list_info
=
NULL
)
{
public
function
__construct
(
ConfigFactory
Interface
$config_factory
,
ModuleHandlerInterface
$module_handler
,
CacheBackendInterface
$cache_backend
,
InfoParserInterface
$info_parser
,
ConfigInstallerInterface
$config_installer
=
NULL
,
RouteBuilder
$route_builder
=
NULL
,
SystemListingInfo
$system_list_info
=
NULL
)
{
$this
->
configFactory
=
$config_factory
;
$this
->
moduleHandler
=
$module_handler
;
$this
->
cacheBackend
=
$cache_backend
;
...
...
core/lib/Drupal/Core/Form/ConfigFormBase.php
View file @
932e4d9e
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\Core\Form
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Drupal\Core\Form\FormBase
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
...
...
@@ -19,17 +19,17 @@ abstract class ConfigFormBase extends FormBase {
/**
* Stores the configuration factory.
*
* @var \Drupal\Core\Config\ConfigFactory
* @var \Drupal\Core\Config\ConfigFactory
Interface
*/
protected
$configFactory
;
/**
* Constructs a \Drupal\system\ConfigFormBase object.
*
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config_factory
* The factory for configuration objects.
*/
public
function
__construct
(
ConfigFactory
$config_factory
)
{
public
function
__construct
(
ConfigFactory
Interface
$config_factory
)
{
$this
->
configFactory
=
$config_factory
;
}
...
...
core/lib/Drupal/Core/Form/FormBase.php
View file @
932e4d9e
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\Core\Form
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Drupal\Core\DependencyInjection\ContainerInjectionInterface
;
use
Drupal\Core\DependencyInjection\DependencySerialization
;
use
Drupal\Core\Routing\UrlGeneratorInterface
;
...
...
@@ -44,7 +44,7 @@ abstract class FormBase extends DependencySerialization implements FormInterface
/**
* The config factory.
*
* @var \Drupal\Core\Config\ConfigFactory
* @var \Drupal\Core\Config\ConfigFactory
Interface
*/
protected
$configFactory
;
...
...
@@ -143,12 +143,12 @@ public function setTranslationManager(TranslationInterface $translation_manager)
/**
* Sets the config factory for this form.
*
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config_factory
* The config factory.
*
* @return $this
*/
public
function
setConfigFactory
(
ConfigFactory
$config_factory
)
{
public
function
setConfigFactory
(
ConfigFactory
Interface
$config_factory
)
{
$this
->
configFactory
=
$config_factory
;
return
$this
;
}
...
...
core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php
View file @
932e4d9e
...
...
@@ -8,7 +8,7 @@
namespace
Drupal\Core\ImageToolkit
;
use
Drupal\Core\Cache\CacheBackendInterface
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Drupal\Core\Language\LanguageManager
;
use
Drupal\Core\Plugin\DefaultPluginManager
;
...
...
@@ -20,7 +20,7 @@ class ImageToolkitManager extends DefaultPluginManager {
/**
* The config factory.
*
* @var \Drupal\Core\Config\ConfigFactory
* @var \Drupal\Core\Config\ConfigFactory
Interface
*/
protected
$configFactory
;
...
...
@@ -34,10 +34,10 @@ class ImageToolkitManager extends DefaultPluginManager {
* Cache backend instance to use.
* @param \Drupal\Core\Language\LanguageManager $language_manager
* The language manager.
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config_factory
* The config factory.
*/
public
function
__construct
(
\
Traversable
$namespaces
,
CacheBackendInterface
$cache_backend
,
LanguageManager
$language_manager
,
ConfigFactory
$config_factory
)
{
public
function
__construct
(
\
Traversable
$namespaces
,
CacheBackendInterface
$cache_backend
,
LanguageManager
$language_manager
,
ConfigFactory
Interface
$config_factory
)
{
parent
::
__construct
(
'Plugin/ImageToolkit'
,
$namespaces
,
'Drupal\Core\ImageToolkit\Annotation\ImageToolkit'
);
$this
->
setCacheBackend
(
$cache_backend
,
$language_manager
,
'image_toolkit_plugins'
);
...
...
core/lib/Drupal/Core/Mail/MailFactory.php
View file @
932e4d9e
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\Core\Mail
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Drupal\Component\Utility\String
;
/**
...
...
@@ -32,10 +32,10 @@ class MailFactory {
/**
* Constructs a MailFActory object.
*
* @param \Drupal\Core\Config\ConfigFactory $configFactory
* @param \Drupal\Core\Config\ConfigFactory
Interface
$configFactory
* The configuration factory.
*/
public
function
__construct
(
ConfigFactory
$configFactory
)
{
public
function
__construct
(
ConfigFactory
Interface
$configFactory
)
{
$this
->
mailConfig
=
$configFactory
->
get
(
'system.mail'
);
}
...
...
core/lib/Drupal/Core/PathProcessor/PathProcessorDecode.php
View file @
932e4d9e
...
...
@@ -7,7 +7,6 @@
namespace
Drupal\Core\PathProcessor
;
use
Drupal\Core\Config\ConfigFactory
;
use
Symfony\Component\HttpFoundation\Request
;
/**
...
...
core/lib/Drupal/Core/PathProcessor/PathProcessorFront.php
View file @
932e4d9e
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\Core\PathProcessor
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Symfony\Component\HttpFoundation\Request
;
/**
...
...
@@ -18,17 +18,17 @@ class PathProcessorFront implements InboundPathProcessorInterface, OutboundPathP
/**
* A config factory for retrieving required config settings.
*
* @var \Drupal\Core\Config\ConfigFactory
* @var \Drupal\Core\Config\ConfigFactory
Interface
*/
protected
$config
;
/**
* Constructs a PathProcessorFront object.
*
* @param \Drupal\Core\Config\ConfigFactory $config
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config
* A config factory for retrieving the site front page configuration.
*/
public
function
__construct
(
ConfigFactory
$config
)
{
public
function
__construct
(
ConfigFactory
Interface
$config
)
{
$this
->
config
=
$config
;
}
...
...
core/lib/Drupal/Core/Routing/UrlGenerator.php
View file @
932e4d9e
...
...
@@ -17,7 +17,7 @@
use
Drupal\Component\Utility\Settings
;
use
Drupal\Component\Utility\Url
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Drupal\Core\PathProcessor\OutboundPathProcessorInterface
;
use
Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface
;
...
...
@@ -43,7 +43,7 @@ class UrlGenerator extends ProviderBasedGenerator implements UrlGeneratorInterfa
/**
* The route processor.
*
* @var \Drupal\
Tests\
Core\RouteProcessor\OutboundRouteProcessorInterface
* @var \Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface
*/
protected
$routeProcessor
;
...
...
@@ -80,12 +80,18 @@ class UrlGenerator extends ProviderBasedGenerator implements UrlGeneratorInterfa
*
* @param \Drupal\Core\Routing\RouteProviderInterface $provider
* The route provider to be searched for routes.
* @param \Drupal\Core\Path\AliasManagerInterface $alias_manager
* The alias manager responsible for path aliasing.
* @param \Drupal\Core\PathProcessor\OutboundPathProcessorInterface $path_processor
* The path processor to convert the system path to one suitable for urls.
* @param \Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface $route_processor
* The route processor.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config
* The config factory.
* @param \Drupal\Component\Utility\Settings $settings
* The read only settings.
* @param \Symfony\Component\HttpKernel\Log\LoggerInterface $logger
* An optional logger for recording errors.
*/
public
function
__construct
(
RouteProviderInterface
$provider
,
OutboundPathProcessorInterface
$path_processor
,
OutboundRouteProcessorInterface
$route_processor
,
ConfigFactory
$config
,
Settings
$settings
,
LoggerInterface
$logger
=
NULL
)
{
public
function
__construct
(
RouteProviderInterface
$provider
,
OutboundPathProcessorInterface
$path_processor
,
OutboundRouteProcessorInterface
$route_processor
,
ConfigFactory
Interface
$config
,
Settings
$settings
,
LoggerInterface
$logger
=
NULL
)
{
parent
::
__construct
(
$provider
,
$logger
);
$this
->
pathProcessor
=
$path_processor
;
...
...
core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php
View file @
932e4d9e
...
...
@@ -8,7 +8,7 @@
namespace
Drupal\Core\Theme
;
use
Drupal\Core\Access\CsrfTokenGenerator
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Symfony\Cmf\Component\Routing\RouteObjectInterface
;
use
Symfony\Component\HttpFoundation\Request
;
...
...
@@ -41,7 +41,7 @@ class AjaxBasePageNegotiator implements ThemeNegotiatorInterface {
/**
* The config factory.
*
* @var \Drupal\Core\Config\ConfigFactory
* @var \Drupal\Core\Config\ConfigFactory
Interface
*/
protected
$configFactory
;
...
...
@@ -50,10 +50,10 @@ class AjaxBasePageNegotiator implements ThemeNegotiatorInterface {
*
* @param \Drupal\Core\Access\CsrfTokenGenerator $token_generator
* The CSRF token generator.
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config_factory
* The config factory.
*/
public
function
__construct
(
CsrfTokenGenerator
$token_generator
,
ConfigFactory
$config_factory
)
{
public
function
__construct
(
CsrfTokenGenerator
$token_generator
,
ConfigFactory
Interface
$config_factory
)
{
$this
->
csrfGenerator
=
$token_generator
;
$this
->
configFactory
=
$config_factory
;
}
...
...
core/lib/Drupal/Core/Theme/DefaultNegotiator.php
View file @
932e4d9e
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\Core\Theme
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Symfony\Component\HttpFoundation\Request
;
/**
...
...
@@ -25,10 +25,10 @@ class DefaultNegotiator implements ThemeNegotiatorInterface {
/**
* Constructs a DefaultNegotiator object.
*
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config_factory
* The config factory.
*/
public
function
__construct
(
ConfigFactory
$config_factory
)
{
public
function
__construct
(
ConfigFactory
Interface
$config_factory
)
{
$this
->
config
=
$config_factory
->
get
(
'system.theme'
);
}
...
...
core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php
View file @
932e4d9e
...
...
@@ -9,7 +9,7 @@
use
Drupal\aggregator\Plugin\AggregatorPluginManager
;
use
Drupal\Component\Utility\String
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Drupal\Core\Plugin\PluginFormInterface
;
use
Drupal\Core\StringTranslation\TranslationInterface
;
use
Drupal\Core\Form\ConfigFormBase
;
...
...
@@ -48,7 +48,7 @@ class SettingsForm extends ConfigFormBase {
/**
* Constructs a \Drupal\aggregator\SettingsForm object.
*
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config_factory
* The factory for configuration objects.
* @param \Drupal\aggregator\Plugin\AggregatorPluginManager $fetcher_manager
* The aggregator fetcher plugin manager.
...
...
@@ -59,7 +59,7 @@ class SettingsForm extends ConfigFormBase {
* @param \Drupal\Core\StringTranslation\TranslationInterface $translation_manager
* The string translation manager.
*/
public
function
__construct
(
ConfigFactory
$config_factory
,
AggregatorPluginManager
$fetcher_manager
,
AggregatorPluginManager
$parser_manager
,
AggregatorPluginManager
$processor_manager
,
TranslationInterface
$translation_manager
)
{
public
function
__construct
(
ConfigFactory
Interface
$config_factory
,
AggregatorPluginManager
$fetcher_manager
,
AggregatorPluginManager
$parser_manager
,
AggregatorPluginManager
$processor_manager
,
TranslationInterface
$translation_manager
)
{
parent
::
__construct
(
$config_factory
);
$this
->
translationManager
=
$translation_manager
;
$this
->
managers
=
array
(
...
...
core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php
View file @
932e4d9e
...
...
@@ -11,7 +11,7 @@
use
Drupal\aggregator\Plugin\ProcessorInterface
;
use
Drupal\aggregator\Entity\Feed
;
use
Drupal\Core\Database\Database
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Drupal\Core\Plugin\ContainerFactoryPluginInterface
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
...
...
@@ -31,7 +31,7 @@ class DefaultProcessor extends AggregatorPluginSettingsBase implements Processor
/**
* Contains the configuration object factory.
*
* @var \Drupal\Core\Config\ConfigFactory
* @var \Drupal\Core\Config\ConfigFactory
Interface
*/
protected
$configFactory
;
...
...
@@ -44,10 +44,10 @@ class DefaultProcessor extends AggregatorPluginSettingsBase implements Processor
* The plugin_id for the plugin instance.
* @param array $plugin_definition
* The plugin implementation definition.
* @param \Drupal\Core\Config\ConfigFactory $config
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config
* The configuration factory object.
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
array
$plugin_definition
,
ConfigFactory
$config
)
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
array
$plugin_definition
,
ConfigFactory
Interface
$config
)
{
$this
->
configFactory
=
$config
;
// @todo Refactor aggregator plugins to ConfigEntity so merging
// the configuration here is not needed.
...
...
core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php
View file @
932e4d9e
...
...
@@ -10,7 +10,7 @@
use
Drupal\aggregator\Plugin\AggregatorPluginSettingsBase
;
use
Drupal\aggregator\Plugin\ProcessorInterface
;
use
Drupal\aggregator\Entity\Feed
;
use
Drupal\Core\Config\ConfigFactory
;
use
Drupal\Core\Config\ConfigFactory
Interface
;
use
Drupal\Core\Plugin\ContainerFactoryPluginInterface
;
use
Symfony\Component\DependencyInjection\ContainerInterface
;
...
...
@@ -30,7 +30,7 @@ class TestProcessor extends AggregatorPluginSettingsBase implements ProcessorInt
/**
* Contains the configuration object factory.
*
* @var \Drupal\Core\Config\ConfigFactory
* @var \Drupal\Core\Config\ConfigFactory
Interface
*/
protected
$configFactory
;
...
...
@@ -55,10 +55,10 @@ public static function create(ContainerInterface $container, array $configuratio
* The plugin_id for the plugin instance.
* @param array $plugin_definition
* The plugin implementation definition.
* @param \Drupal\Core\Config\ConfigFactory $config
* @param \Drupal\Core\Config\ConfigFactory
Interface
$config
* The configuration factory object.
*/
public
function
__construct
(
array
$configuration
,
$plugin_id
,
array
$plugin_definition
,
ConfigFactory
$config
)
{
public
function
__construct
(
array
$configuration
,
$plugin_id
,
array
$plugin_definition
,
ConfigFactory
Interface
$config
)
{
$this
->
configFactory
=
$config
;
parent
::
__construct
(
$configuration
+
$this
->
getConfiguration
(),
$plugin_id
,
$plugin_definition
);
}
...
...
Prev
1
2
3
4
5
Next
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