public function ConfigSplitController::enableEntity in Configuration Split 2.0.x
Same name and namespace in other branches
- 8 src/Controller/ConfigSplitController.php \Drupal\config_split\Controller\ConfigSplitController::enableEntity()
Enable 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::enableEntity'
File
- src/
Controller/ ConfigSplitController.php, line 25
Class
- ConfigSplitController
- The controller for split actions.
Namespace
Drupal\config_split\ControllerCode
public function enableEntity($config_split) {
$entity = $this
->entityTypeManager()
->getStorage('config_split')
->load($config_split);
$entity
->set('status', TRUE);
$entity
->save();
return $this
->redirect('entity.config_split.collection');
}