function CommentLazyBuilders::access

Same name and namespace in other branches
  1. 11.x core/modules/comment/src/CommentLazyBuilders.php \Drupal\comment\CommentLazyBuilders::access()
  2. 10 core/modules/comment/src/CommentLazyBuilders.php \Drupal\comment\CommentLazyBuilders::access()
  3. 9 core/modules/comment/src/CommentLazyBuilders.php \Drupal\comment\CommentLazyBuilders::access()
  4. 8.9.x core/modules/comment/src/CommentLazyBuilders.php \Drupal\comment\CommentLazyBuilders::access()

Wraps content_translation_translate_access.

Deprecated

in drupal:11.4.0 and is removed from drupal:13.0.0. Use the access() method of the content_translation.manager service instead.

See also

https://www.drupal.org/node/3567484

File

core/modules/comment/src/CommentLazyBuilders.php, line 233

Class

CommentLazyBuilders
Defines a service for comment #lazy_builder callbacks.

Namespace

Drupal\comment

Code

protected function access(EntityInterface $entity) {
  @trigger_error(__METHOD__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use the access() method of the content_translation.manager service instead. See https://www.drupal.org/node/3567484', E_USER_DEPRECATED);
  return \Drupal::service('content_translation.manager')->access($entity);
}

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