Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Comment.php

function Comment::getThread

Overrides CommentInterface::getThread

1 call to Comment::getThread()
Comment::preSave in core/modules/comment/src/Entity/Comment.php
Acts on an entity before the presave hook is invoked.

File

core/modules/comment/src/Entity/Comment.php, line 496

Class

Comment
Defines the comment entity class.

Namespace

Drupal\comment\Entity

Code

public function getThread() {
    $thread = $this->get('thread');
    if (!empty($thread->value)) {
        return $thread->value;
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal