CommentFieldItemList::get

public CommentFieldItemList::get($index) Returns the item at the specified position in this list. Parameters int $index: Index of the item to return. Return value \Drupal\Core\TypedData\TypedDataInterface|null The item at the specified position in this list, or NULL if no item exists at that position. Throws \Drupal\Core\TypedData\Exception\MissingDataException If the complex data structure is unset and no item can be created. Overrides ItemList::get File core/modules/comment/src/CommentFiel

CommentFieldItemList::access

public CommentFieldItemList::access($operation = 'view', AccountInterface $account = NULL, $return_as_object = FALSE) Checks data value access. Parameters string $operation: The operation to be performed. \Drupal\Core\Session\AccountInterface $account: (optional) The user for which to check access, or NULL to check access for the current user. Defaults to NULL. bool $return_as_object: (optional) Defaults to FALSE. Return value bool|\Drupal\Core\Access\AccessResultInterface The access result.

CommentFieldItemList

Defines a item list class for comment fields. Hierarchy class \Drupal\Core\TypedData\TypedData implements PluginInspectionInterface, TypedDataInterface uses StringTranslationTrait, TypedDataTraitclass \Drupal\Core\TypedData\Plugin\DataType\ItemList implements \IteratorAggregate, ListInterfaceclass \Drupal\Core\Field\FieldItemList implements FieldItemListInterfaceclass \Drupal\comment\CommentFieldItemList File core/modules/comment/src/CommentFieldItemList.php, line 12 Namespace Drupal\

CommentController::replyFormAccess

public CommentController::replyFormAccess(EntityInterface $entity, $field_name, $pid = NULL) Access check for the reply form. Parameters \Drupal\Core\Entity\EntityInterface $entity: The entity this comment belongs to. string $field_name: The field_name to which the comment belongs. int $pid: (optional) Some comments are replies to other comments. In those cases, $pid is the parent comment's comment ID. Defaults to NULL. Return value \Drupal\Core\Access\AccessResultInterface An access result T

CommentController::__construct

public CommentController::__construct(HttpKernelInterface $http_kernel, CommentManagerInterface $comment_manager, EntityManagerInterface $entity_manager) Constructs a CommentController object. Parameters \Symfony\Component\HttpKernel\HttpKernelInterface $http_kernel: HTTP kernel to handle requests. \Drupal\comment\CommentManagerInterface $comment_manager: The comment manager service. \Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager service. File core/modules/comme

CommentController::redirectNode

public CommentController::redirectNode(EntityInterface $node) Redirects legacy node links to the new path. Parameters \Drupal\Core\Entity\EntityInterface $node: The node object identified by the legacy URL. Return value \Symfony\Component\HttpFoundation\RedirectResponse Redirects user to new url. Throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException File core/modules/comment/src/Controller/CommentController.php, line 172 Class CommentController Controller for the comment

CommentController::renderNewCommentsNodeLinks

public CommentController::renderNewCommentsNodeLinks(Request $request) Returns a set of nodes' last read timestamps. Parameters \Symfony\Component\HttpFoundation\Request $request: The request of the page. Return value \Symfony\Component\HttpFoundation\JsonResponse The JSON response. Throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException File core/modules/comment/src/Controller/CommentController.php, line 314 C

CommentController::commentApprove

public CommentController::commentApprove(CommentInterface $comment) Publishes the specified comment. Parameters \Drupal\comment\CommentInterface $comment: A comment entity. Return value \Symfony\Component\HttpFoundation\RedirectResponse File core/modules/comment/src/Controller/CommentController.php, line 84 Class CommentController Controller for the comment entity. Namespace Drupal\comment\Controller Code public function commentApprove(CommentInterface $comment) { $comment->setP

CommentController::$httpKernel

The HTTP kernel. Type: \Symfony\Component\HttpKernel\HttpKernelInterface File core/modules/comment/src/Controller/CommentController.php, line 33 Class CommentController Controller for the comment entity. Namespace Drupal\comment\Controller Code protected $httpKernel;

CommentController::commentPermalinkTitle

public CommentController::commentPermalinkTitle(CommentInterface $comment) The _title_callback for the page that renders the comment permalink. Parameters \Drupal\comment\CommentInterface $comment: The current comment. Return value string The translated comment subject. File core/modules/comment/src/Controller/CommentController.php, line 157 Class CommentController Controller for the comment entity. Namespace Drupal\comment\Controller Code public function commentPermalinkTitle(Commen