diff --git a/core/modules/forum/forum.routing.yml b/core/modules/forum/forum.routing.yml index 13eb837..a5573d0 100644 --- a/core/modules/forum/forum.routing.yml +++ b/core/modules/forum/forum.routing.yml @@ -13,13 +13,13 @@ forum_settings: forum_add_container: pattern: 'admin/structure/forum/add/container' defaults: - _controller: 'Drupal\forum\ForumController::addContainer' + _content: 'Drupal\forum\ForumController::addContainer' requirements: _permission: 'administer forums' forum_add_forum: pattern: 'admin/structure/forum/add/forum' defaults: - _controller: 'Drupal\forum\ForumController::addForum' + _content: 'Drupal\forum\ForumController::addForum' requirements: _permission: 'administer forums' forum_edit_container: diff --git a/core/modules/forum/lib/Drupal/forum/ContainerFormController.php b/core/modules/forum/lib/Drupal/forum/ContainerFormController.php index 62c6af0..24dbd1d 100644 --- a/core/modules/forum/lib/Drupal/forum/ContainerFormController.php +++ b/core/modules/forum/lib/Drupal/forum/ContainerFormController.php @@ -41,9 +41,9 @@ public function form(array $form, array &$form_state) { * {@inheritdoc} */ public function save(array $form, array &$form_state) { - $insert = $this->entity->isNew(); + $is_new = $this->entity->isNew(); $term = parent::save($form, $form_state); - if ($insert) { + if ($is_new) { // Update config item to track the container terms. $containers = $this->config->get('containers'); $containers[] = $term->id(); diff --git a/core/modules/forum/lib/Drupal/forum/ForumFormController.php b/core/modules/forum/lib/Drupal/forum/ForumFormController.php index 4bce670..37822ed 100644 --- a/core/modules/forum/lib/Drupal/forum/ForumFormController.php +++ b/core/modules/forum/lib/Drupal/forum/ForumFormController.php @@ -8,6 +8,7 @@ namespace Drupal\forum; use Drupal\taxonomy\TermFormController; +use Drupal\Core\Config\ConfigFactory; use Drupal\Core\Entity\EntityControllerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;