Commit 272c5c6b authored by alexpott's avatar alexpott

Issue #2027335 by YesCT: If EntityFormController implements...

Issue #2027335 by YesCT: If EntityFormController implements EntityControllerInterface it can ignore  in createInstance()/__construct().
parent ab61b252
......@@ -52,13 +52,10 @@ class MenuLinkFormController extends EntityFormController implements EntityContr
/**
* Constructs a new MenuLinkFormController object.
*
* @param string $operation
* The name of the current operation.
* @param \Drupal\Core\Path\AliasManagerInterface $path_alias_manager
* The path alias manager.
*/
public function __construct($operation, MenuLinkStorageControllerInterface $menu_link_storage_controller, AliasManagerInterface $path_alias_manager, UrlGenerator $url_generator, ModuleHandlerInterface $module_handler) {
parent::__construct($operation);
public function __construct(MenuLinkStorageControllerInterface $menu_link_storage_controller, AliasManagerInterface $path_alias_manager, UrlGenerator $url_generator, ModuleHandlerInterface $module_handler) {
$this->menuLinkStorageController = $menu_link_storage_controller;
$this->pathAliasManager = $path_alias_manager;
$this->urlGenerator = $url_generator;
......@@ -68,9 +65,8 @@ public function __construct($operation, MenuLinkStorageControllerInterface $menu
/**
* {@inheritdoc}
*/
public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info, $operation = NULL) {
public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) {
return new static(
$operation,
$container->get('plugin.manager.entity')->getStorageController('menu_link'),
$container->get('path.alias_manager.cached'),
$container->get('url_generator'),
......
......@@ -28,23 +28,18 @@ class ViewAddFormController extends ViewFormControllerBase implements EntityCont
/**
* Constructs a new ViewEditFormController object.
*
* @param string $operation
* The name of the current operation.
* @param \Drupal\views\Plugin\ViewsPluginManager $wizard_manager
* The wizard plugin manager.
*/
public function __construct($operation, ViewsPluginManager $wizard_manager) {
parent::__construct($operation);
public function __construct(ViewsPluginManager $wizard_manager) {
$this->wizardManager = $wizard_manager;
}
/**
* {@inheritdoc}
*/
public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info, $operation = NULL) {
public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) {
return new static(
$operation,
$container->get('plugin.manager.views.wizard')
);
}
......
......@@ -39,16 +39,12 @@ class ViewEditFormController extends ViewFormControllerBase implements EntityCon
/**
* Constructs a new ViewEditFormController object.
*
* @param string $operation
* The name of the current operation.
* @param \Drupal\user\TempStoreFactory $temp_store_factory
* The factory for the temp store object.
* @param \Symfony\Component\HttpFoundation\Request $request
* The request object.
*/
public function __construct($operation, TempStoreFactory $temp_store_factory, Request $request) {
parent::__construct($operation);
public function __construct(TempStoreFactory $temp_store_factory, Request $request) {
$this->tempStore = $temp_store_factory->get('views');
$this->request = $request;
}
......@@ -56,9 +52,8 @@ public function __construct($operation, TempStoreFactory $temp_store_factory, Re
/**
* {@inheritdoc}
*/
public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info, $operation = NULL) {
public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) {
return new static(
$operation,
$container->get('user.tempstore'),
$container->get('request')
);
......
......@@ -26,23 +26,18 @@ class ViewPreviewFormController extends ViewFormControllerBase implements Entity
/**
* Constructs a new ViewPreviewFormController object.
*
* @param string $operation
* The name of the current operation.
* @param \Drupal\user\TempStoreFactory $temp_store_factory
* The factory for the temp store object.
*/
public function __construct($operation, TempStoreFactory $temp_store_factory) {
parent::__construct($operation);
public function __construct(TempStoreFactory $temp_store_factory) {
$this->tempStore = $temp_store_factory->get('views');
}
/**
* {@inheritdoc}
*/
public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info, $operation = NULL) {
public static function createInstance(ContainerInterface $container, $entity_type, array $entity_info) {
return new static(
$operation,
$container->get('user.tempstore')
);
}
......
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