public static function ModalForm::create in Modal 8.3
Same name and namespace in other branches
- 8.2 src/Form/ModalForm.php \Drupal\modal_page\Form\ModalForm::create()
- 5.0.x src/Form/ModalForm.php \Drupal\modal_page\Form\ModalForm::create()
Instantiates a new instance of this class.
This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container this instance should use.
Overrides ContentEntityForm::create
File
- src/
Form/ ModalForm.php, line 22
Class
- ModalForm
- Class: ModalForm.
Namespace
Drupal\modal_page\FormCode
public static function create(ContainerInterface $container) {
$instance = parent::create($container);
$instance
->setLanguageManager($container
->get('language_manager'));
return $instance;
}