You are here

public static function WebformSubmissionForm::create in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformSubmissionForm.php \Drupal\webform\WebformSubmissionForm::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/WebformSubmissionForm.php, line 285

Class

WebformSubmissionForm
Provides a webform to collect and edit submissions.

Namespace

Drupal\webform

Code

public static function create(ContainerInterface $container) {
  return new static($container
    ->get('entity.repository'), $container
    ->get('config.factory'), $container
    ->get('renderer'), $container
    ->get('path.alias_manager'), $container
    ->get('path.validator'), $container
    ->get('webform.request'), $container
    ->get('plugin.manager.webform.element'), $container
    ->get('webform.third_party_settings_manager'), $container
    ->get('webform.message_manager'), $container
    ->get('webform.token_manager'), $container
    ->get('webform_submission.conditions_validator'), $container
    ->get('webform.entity_reference_manager'), $container
    ->get('webform_submission.generate'), $container
    ->get('page_cache_kill_switch'), $container
    ->get('plugin.manager.entity_reference_selection'), $container
    ->get('entity_field.manager'), $container
    ->get('form_builder'));
}