// In order to create a referenceable comment, it needs to published.
/** @var \Drupal\comment\CommentInterface $comment */
- $comment->setPublished(TRUE);
+ $comment->setPublished();
return $comment;
}
// Passing the query to node_query_node_access_alter() is sadly
// insufficient for nodes.
- // @see SelectionEntityTypeNode::entityQueryAlter()
+ // @see \Drupal\node\Plugin\EntityReferenceSelection\NodeSelection::buildEntityQuery()
if (!$this->currentUser->hasPermission('bypass node access') && !count($this->moduleHandler->getImplementations('node_grants'))) {
$query->condition($node_alias . '.status', 1);
}