You are here

public function AjaxCommentsForm::__construct in AJAX Comments 8

Constructs a new CommentForm.

Parameters

\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Drupal\Core\Render\RendererInterface $renderer: The renderer.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

\Drupal\Core\Routing\CurrentRouteMatch $current_route_match: The CurrentRouteMatch service.

\Drupal\ajax_comments\FieldSettingsHelper $field_settings_helper: The FieldSettingsHelper service.

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle service.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

\Drupal\ajax_comments\TempStore $temp_store: The TempStore service.

Overrides CommentForm::__construct

File

src/Form/AjaxCommentsForm.php, line 82

Class

AjaxCommentsForm
Provides ajax enhancements to core default Comment form.

Namespace

Drupal\ajax_comments\Form

Code

public function __construct(EntityRepositoryInterface $entity_repository, AccountInterface $current_user, RendererInterface $renderer, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL, EntityFieldManagerInterface $entity_field_manager = NULL, RequestStack $request_stack, CurrentRouteMatch $current_route_match, FieldSettingsHelper $field_settings_helper, TempStore $temp_store) {
  parent::__construct($entity_repository, $current_user, $renderer, $entity_type_bundle_info, $time, $entity_field_manager);
  $this->requestStack = $request_stack;
  $this->currentRouteMatch = $current_route_match;
  $this->fieldSettingsHelper = $field_settings_helper;
  $this->tempStore = $temp_store;
}