diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php index a51be4c..fdf22c6 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php @@ -97,16 +97,16 @@ class ConfigStorageController implements EntityStorageControllerInterface, Entit /** * Constructs a ConfigStorageController object. * - * @param string $entityType + * @param string $entity_type * The entity type for which the instance is created. * @param \Drupal\Core\Config\ConfigFactory $config_factory * The config factory service. * @param \Drupal\Core\Config\StorageInterface $config_storage * The config storage service. */ - public function __construct($entityType, ConfigFactory $config_factory, StorageInterface $config_storage) { - $this->entityType = $entityType; - $this->entityInfo = entity_get_info($entityType); + public function __construct($entity_type, ConfigFactory $config_factory, StorageInterface $config_storage) { + $this->entityType = $entity_type; + $this->entityInfo = entity_get_info($entity_type); $this->hookLoadArguments = array(); $this->idKey = $this->entityInfo['entity_keys']['id']; diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php index 4192f5a..fe5d5fb 100644 --- a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php +++ b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php @@ -135,15 +135,15 @@ public static function createInstance(ContainerInterface $container, $entity_typ /** * Constructs a DatabaseStorageController object. * - * @param string $entityType + * @param string $entity_type * The entity type for which the instance is created. * @param \Drupal\Core\Database\Connection $database * The database connection to be used. */ - public function __construct($entityType, Connection $database) { + public function __construct($entity_type, Connection $database) { $this->database = $database; - $this->entityType = $entityType; - $this->entityInfo = entity_get_info($entityType); + $this->entityType = $entity_type; + $this->entityInfo = entity_get_info($entity_type); $this->entityCache = array(); $this->hookLoadArguments = array(); diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index 6be0e2d..a075abf 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -159,7 +159,7 @@ public function getListController($entity_type) { if (!isset($this->controllers['listing'][$entity_type])) { $class = $this->getControllerClass($entity_type, 'list'); if (in_array('Drupal\Core\Entity\EntityControllerInterface', class_implements($class))) { - $this->controllers['listing'][$entity_type] = $class::createInstance($this->container, $entity_type, $this->getStorageController($entity_type)); + $this->controllers['listing'][$entity_type] = $class::createInstance($this->container, $entity_type); } else { $this->controllers['listing'][$entity_type] = new $class($entity_type, $this->getStorageController($entity_type)); @@ -183,7 +183,7 @@ public function getFormController($entity_type, $operation) { if (!isset($this->controllers['form'][$operation][$entity_type])) { $class = $this->getControllerClass($entity_type, 'form', $operation); if (in_array('Drupal\Core\Entity\EntityControllerInterface', class_implements($class))) { - $this->controllers['form'][$operation][$entity_type] = $class::createInstance($this->container, $entity_type, $operation); + $this->controllers['form'][$operation][$entity_type] = $class::createInstance($this->container, $entity_type); } else { $this->controllers['form'][$operation][$entity_type] = new $class($operation); diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php index 06c89ff..8d0ed29 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php @@ -68,10 +68,6 @@ public static function createInstance(ContainerInterface $container, $entity_typ * Overrides Drupal\Core\Entity\EntityFormController::form(). */ public function form(array $form, array &$form_state) { - $query = $this->request->query; - // @todo: Revisit this when http://drupal.org/node/1668866 is in. - $form_state['redirect'] = $query->get('destination'); - $view = $this->entity; $display_id = $this->displayID; // Do not allow the form to be cached, because $form_state['view'] can become @@ -272,7 +268,10 @@ public function submit(array $form, array &$form_state) { } $view->set('display', $displays); - if (!empty($form_state['destination'])) { + // @todo: Revisit this when http://drupal.org/node/1668866 is in. + $destination = $this->request->query->get('destination'); + + if (!empty($destination)) { // Find out the first display which has a changed path and redirect to this url. $old_view = views_get_view($view->id()); $old_view->initDisplay();