function CommentForm::create

Same name in other branches
  1. 9 core/modules/comment/src/CommentForm.php \Drupal\comment\CommentForm::create()
  2. 8.9.x core/modules/comment/src/CommentForm.php \Drupal\comment\CommentForm::create()
  3. 11.x core/modules/comment/src/CommentForm.php \Drupal\comment\CommentForm::create()

Overrides ContentEntityForm::create

File

core/modules/comment/src/CommentForm.php, line 54

Class

CommentForm
Base handler for comment forms.

Namespace

Drupal\comment

Code

public static function create(ContainerInterface $container) {
    return new static($container->get('entity.repository'), $container->get('current_user'), $container->get('renderer'), $container->get('entity_type.bundle.info'), $container->get('datetime.time'), $container->get('entity_field.manager'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.