class HtmlFormController in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Controller/HtmlFormController.php \Drupal\Core\Controller\HtmlFormController
Wrapping controller for forms that serve as the main page body.
Hierarchy
- class \Drupal\Core\Controller\FormController uses DependencySerializationTrait
- class \Drupal\Core\Controller\HtmlFormController
Expanded class hierarchy of HtmlFormController
1 string reference to 'HtmlFormController'
- core.services.yml in core/
core.services.yml - core/core.services.yml
1 service uses HtmlFormController
File
- core/
lib/ Drupal/ Core/ Controller/ HtmlFormController.php, line 17 - Contains \Drupal\Core\Controller\HtmlFormController.
Namespace
Drupal\Core\ControllerView source
class HtmlFormController extends FormController {
/**
* The class resolver.
*
* @var \Drupal\Core\DependencyInjection\ClassResolverInterface;
*/
protected $classResolver;
/**
* Constructs a new \Drupal\Core\Routing\Enhancer\FormEnhancer object.
*
* @param \Drupal\Core\Controller\ControllerResolverInterface $controller_resolver
* The controller resolver.
* @param \Drupal\Core\Form\FormBuilderInterface $form_builder
* The form builder.
* @param \Drupal\Core\DependencyInjection\ClassResolverInterface $class_resolver
* The class resolver.
*/
public function __construct(ControllerResolverInterface $controller_resolver, FormBuilderInterface $form_builder, ClassResolverInterface $class_resolver) {
parent::__construct($controller_resolver, $form_builder);
$this->classResolver = $class_resolver;
}
/**
* {@inheritdoc}
*/
protected function getFormArgument(RouteMatchInterface $route_match) {
return $route_match
->getRouteObject()
->getDefault('_form');
}
/**
* {@inheritdoc}
*/
protected function getFormObject(RouteMatchInterface $route_match, $form_arg) {
return $this->classResolver
->getInstanceFromDefinition($form_arg);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
FormController:: |
protected | property | The controller resolver. | |
FormController:: |
protected | property | The form builder. | |
FormController:: |
public | function | Invokes the form and returns the result. | |
HtmlFormController:: |
protected | property | The class resolver. | |
HtmlFormController:: |
protected | function |
Extracts the form argument string from a request. Overrides FormController:: |
|
HtmlFormController:: |
protected | function |
Returns the object used to build the form. Overrides FormController:: |
|
HtmlFormController:: |
public | function |
Constructs a new \Drupal\Core\Routing\Enhancer\FormEnhancer object. Overrides FormController:: |