updated core to 8.6.1 via composer
This commit is contained in:
@@ -59,7 +59,8 @@ class PathController extends ControllerBase {
|
||||
* The request object.
|
||||
*
|
||||
* @return array
|
||||
* A render array as expected by drupal_render().
|
||||
* A render array as expected by
|
||||
* \Drupal\Core\Render\RendererInterface::render().
|
||||
*/
|
||||
public function adminOverview(Request $request) {
|
||||
$keys = $request->query->get('search');
|
||||
|
||||
@@ -138,7 +138,7 @@ abstract class PathFormBase extends FormBase {
|
||||
else {
|
||||
$form['langcode'] = [
|
||||
'#type' => 'value',
|
||||
'#value' => $this->path['langcode']
|
||||
'#value' => $this->path['langcode'],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ abstract class PathFormBase extends FormBase {
|
||||
|
||||
$this->aliasStorage->save($source, $alias, $langcode, $pid);
|
||||
|
||||
drupal_set_message($this->t('The alias has been saved.'));
|
||||
$this->messenger()->addStatus($this->t('The alias has been saved.'));
|
||||
$form_state->setRedirect('path.admin_overview');
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,27 @@ class PathWidget extends WidgetBase {
|
||||
'#type' => 'value',
|
||||
'#value' => $items[$delta]->langcode,
|
||||
];
|
||||
|
||||
// If the advanced settings tabs-set is available (normally rendered in the
|
||||
// second column on wide-resolutions), place the field as a details element
|
||||
// in this tab-set.
|
||||
if (isset($form['advanced'])) {
|
||||
$element += [
|
||||
'#type' => 'details',
|
||||
'#title' => t('URL path settings'),
|
||||
'#open' => !empty($items[$delta]->alias),
|
||||
'#group' => 'advanced',
|
||||
'#access' => $entity->get('path')->access('edit'),
|
||||
'#attributes' => [
|
||||
'class' => ['path-form'],
|
||||
],
|
||||
'#attached' => [
|
||||
'library' => ['path/drupal.path'],
|
||||
],
|
||||
];
|
||||
$element['#weight'] = 30;
|
||||
}
|
||||
|
||||
return $element;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user