You are here

public static function ThunderNodeForm::create in Thunder 6.2.x

Same name and namespace in other branches
  1. 8.5 modules/thunder_article/src/Form/ThunderNodeForm.php \Drupal\thunder_article\Form\ThunderNodeForm::create()
  2. 8.2 modules/thunder_article/src/Form/ThunderNodeForm.php \Drupal\thunder_article\Form\ThunderNodeForm::create()
  3. 8.3 modules/thunder_article/src/Form/ThunderNodeForm.php \Drupal\thunder_article\Form\ThunderNodeForm::create()
  4. 8.4 modules/thunder_article/src/Form/ThunderNodeForm.php \Drupal\thunder_article\Form\ThunderNodeForm::create()
  5. 6.0.x modules/thunder_article/src/Form/ThunderNodeForm.php \Drupal\thunder_article\Form\ThunderNodeForm::create()
  6. 6.1.x modules/thunder_article/src/Form/ThunderNodeForm.php \Drupal\thunder_article\Form\ThunderNodeForm::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 ContainerInjectionInterface::create

File

modules/thunder_article/src/Form/ThunderNodeForm.php, line 106

Class

ThunderNodeForm
Base for handler for node add/edit forms.

Namespace

Drupal\thunder_article\Form

Code

public static function create(ContainerInterface $container) {
  return new static($container
    ->get('current_user'), $container
    ->get('messenger'), $container
    ->get('request_stack'), $container
    ->get('access_check.node.revision'), $container
    ->get('entity_type.manager'), $container
    ->get('theme.manager'), $container
    ->has('content_moderation.moderation_information') ? $container
    ->get('content_moderation.moderation_information') : NULL);
}