function ConfigTestController::disable

Same name and namespace in other branches
  1. 9 core/modules/config/tests/config_test/src/ConfigTestController.php \Drupal\config_test\ConfigTestController::disable()
  2. 8.9.x core/modules/config/tests/config_test/src/ConfigTestController.php \Drupal\config_test\ConfigTestController::disable()
  3. 10 core/modules/config/tests/config_test/src/ConfigTestController.php \Drupal\config_test\ConfigTestController::disable()

Disables a ConfigTest object.

Parameters

\Drupal\config_test\Entity\ConfigTest $config_test: The ConfigTest object to disable.

Return value

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

1 string reference to 'ConfigTestController::disable'
config_test.routing.yml in core/modules/config/tests/config_test/config_test.routing.yml
core/modules/config/tests/config_test/config_test.routing.yml

File

core/modules/config/tests/config_test/src/ConfigTestController.php, line 50

Class

ConfigTestController
Route controller class for the config_test module.

Namespace

Drupal\config_test

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.