function NodeRevisionRevertForm::create

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

Overrides FormBase::create

1 method overrides NodeRevisionRevertForm::create()
NodeRevisionRevertTranslationForm::create in core/modules/node/src/Form/NodeRevisionRevertTranslationForm.php
Instantiates a new instance of this class.

File

core/modules/node/src/Form/NodeRevisionRevertForm.php, line 68

Class

NodeRevisionRevertForm
Provides a form for reverting a node revision.

Namespace

Drupal\node\Form

Code

public static function create(ContainerInterface $container) {
    return new static($container->get('entity_type.manager')
        ->getStorage('node'), $container->get('date.formatter'), $container->get('datetime.time'));
}

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