public function ConfigSplitController::disableEntity in Configuration Split 2.0.x
Same name and namespace in other branches
- 8 src/Controller/ConfigSplitController.php \Drupal\config_split\Controller\ConfigSplitController::disableEntity()
Disable the split.
Parameters
string $config_split: The split name.
Return value
\Symfony\Component\HttpFoundation\RedirectResponse The response.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
\Drupal\Core\Entity\EntityStorageException
1 string reference to 'ConfigSplitController::disableEntity'
File
- src/
Controller/ ConfigSplitController.php, line 46
Class
- ConfigSplitController
- The controller for split actions.
Namespace
Drupal\config_split\ControllerCode
public function disableEntity($config_split) {
$entity = $this
->entityTypeManager()
->getStorage('config_split')
->load($config_split);
$entity
->set('status', FALSE);
$entity
->save();
return $this
->redirect('entity.config_split.collection');
}