public function FrontendEnvironmentAddController::frontendEnvironmentAddConfigureForm in Build Hooks 8.2
Same name and namespace in other branches
- 3.x src/Controller/FrontendEnvironmentAddController.php \Drupal\build_hooks\Controller\FrontendEnvironmentAddController::frontendEnvironmentAddConfigureForm()
Add the Frontend environment form.
Parameters
string $plugin_id: The plugin id of the frontend environment.
Return value
array The form to add and configure a frontend environment entity.
Throws
\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
\Drupal\Component\Plugin\Exception\PluginNotFoundException
1 string reference to 'FrontendEnvironmentAddController::frontendEnvironmentAddConfigureForm'
File
- src/
Controller/ FrontendEnvironmentAddController.php, line 24
Class
- FrontendEnvironmentAddController
- Controller for building the block instance add form.
Namespace
Drupal\build_hooks\ControllerCode
public function frontendEnvironmentAddConfigureForm($plugin_id) {
// Create a frontend environment entity.
$entity = $this
->entityTypeManager()
->getStorage('frontend_environment')
->create([
'plugin' => $plugin_id,
]);
return $this
->entityFormBuilder()
->getForm($entity);
}