diff --git a/core/lib/Drupal/Core/Path/AliasManager.php b/core/lib/Drupal/Core/Path/AliasManager.php index 08762f2..d1e2797 100644 --- a/core/lib/Drupal/Core/Path/AliasManager.php +++ b/core/lib/Drupal/Core/Path/AliasManager.php @@ -312,6 +312,7 @@ protected function pathAliasWhitelistRebuild($source = NULL) { } $this->whitelist->clear(); } + /** * Checks if a path alias exists. * diff --git a/core/modules/path/lib/Drupal/path/Controller/PathController.php b/core/modules/path/lib/Drupal/path/Controller/PathController.php index be106e9..1302854 100644 --- a/core/modules/path/lib/Drupal/path/Controller/PathController.php +++ b/core/modules/path/lib/Drupal/path/Controller/PathController.php @@ -37,6 +37,11 @@ class PathController extends ControllerBase implements ContainerInjectionInterfa /** * Constructs a PathController object. + * + * @param \Drupal\Core\Database\Connection $connection + * The database connection service. + * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager + * The path alias manager service. */ public function __construct(Connection $connection, AliasManagerInterface $alias_manager ) { $this->connection = $connection; @@ -91,8 +96,8 @@ public function adminOverview($alias = NULL) { $header[] = $this->t('Operations'); $query = $this->connection->select('url_alias') - ->extend('Drupal\Core\Database\Query\PagerSelectExtender') - ->extend('Drupal\Core\Database\Query\TableSortExtender'); + ->extend('\Drupal\Core\Database\Query\PagerSelectExtender') + ->extend('\Drupal\Core\Database\Query\TableSortExtender'); if ($alias) { // Replace wildcards with PDO wildcards. $query->condition('alias', '%' . preg_replace('!\*+!', '%', $alias) . '%', 'LIKE'); diff --git a/core/modules/path/lib/Drupal/path/Form/EditForm.php b/core/modules/path/lib/Drupal/path/Form/EditForm.php index 75c1f70..782adc2 100644 --- a/core/modules/path/lib/Drupal/path/Form/EditForm.php +++ b/core/modules/path/lib/Drupal/path/Form/EditForm.php @@ -41,7 +41,7 @@ class EditForm extends FormBase { protected $aliasManager; /** - * Constructs a \Drupal\Core\Form\FormBase object. + * Constructs an EditForm object. * * @param \Drupal\Core\Path\Path $path * The path crud service. @@ -57,7 +57,7 @@ public function __construct(Path $path, ModuleHandlerInterface $module_handler, } /** - * {{@inheritdoc}} + * {@inheritdoc} */ public static function create(ContainerInterface $container) { return new static( @@ -76,8 +76,6 @@ public function getFormID() { /** * {@inheritdoc} - * @param int $pid - * an alias id for editing or NULL to add a new one. */ public function buildForm(array $form, array &$form_state, $pid = NULL) { $path_alias = $this->path->load(array('pid' => $pid)); @@ -196,10 +194,11 @@ public function submitForm(array &$form, array &$form_state) { */ public function deleteForm(array &$form, array &$form_state) { $pid = isset($form_state['values']['pid']) ? $form_state['values']['pid'] : NULL; + $query = $this->getRequest()->query; $destination = array(); - if ($this->getRequest()->query->has('destination')) { - $destination = array('destination' => $this->getRequest()->query->get('destination')); - $this->getRequest()->query->remove('destination'); + if ($query->has('destination')) { + $destination = array('destination' => $query->get('destination')); + $query->remove('destination'); } $form_state['redirect'] = array('admin/config/search/path/delete/' . $pid, array('query' => $destination)); } diff --git a/core/modules/path/lib/Drupal/path/Form/PathAdminFilterForm.php b/core/modules/path/lib/Drupal/path/Form/PathAdminFilterForm.php index 5c847a9..05575cf 100644 --- a/core/modules/path/lib/Drupal/path/Form/PathAdminFilterForm.php +++ b/core/modules/path/lib/Drupal/path/Form/PathAdminFilterForm.php @@ -22,17 +22,7 @@ public function getFormID() { } /** - * Form constructor. - * - * @param array $form - * An associative array containing the structure of the form. - * @param array $form_state - * An associative array containing the current state of the form. - * @param string $alias - * A string containing a keyword for searching aliases. - * - * @return array - * The form structure. + * {@inheritdoc} */ public function buildForm(array $form, array &$form_state, $alias = NULL) { $form['#attributes'] = array( @@ -79,7 +69,7 @@ public function validateFilter(array &$form, array &$form_state) { } /** - * Filter Form submission handler. + * Filters form submission handler. * * @param array $form * An associative array containing the structure of the form. @@ -91,7 +81,7 @@ public function submitFilter(array &$form, array &$form_state) { } /** - * Reset Form submission handler. + * Resets form submission handler. * * @param array $form * An associative array containing the structure of the form.