You are here

public function ContainerController::disable in GoogleTagManager 8

Disables a Container object.

Parameters

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

Return value

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

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

File

src/ContainerController.php, line 74

Class

ContainerController
Controller for the container configuration entity type.

Namespace

Drupal\google_tag

Code

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