You are here

public function ContainerController::enable in GoogleTagManager 8

Enables a Container object.

@todo The parameter name must match that used in routing.yml although the documentation suggests otherwise.

Parameters

\Drupal\google_tag\Entity\Container $google_tag_container: The Container object to enable.

Return value

\Symfony\Component\HttpFoundation\RedirectResponse A redirect response to the google_tag_container listing page.

1 string reference to 'ContainerController::enable'
google_tag.routing.yml in ./google_tag.routing.yml
google_tag.routing.yml

File

src/ContainerController.php, line 60

Class

ContainerController
Controller for the container configuration entity type.

Namespace

Drupal\google_tag

Code

public function enable(Container $google_tag_container) {
  $google_tag_container
    ->enable()
    ->save();
  return new RedirectResponse($google_tag_container
    ->toUrl('collection', [
    'absolute' => TRUE,
  ])
    ->toString());
}