function CommentTypeForm::entityTypeSupportsComments

Same name and namespace in other branches
  1. 10 core/modules/comment/src/CommentTypeForm.php \Drupal\comment\CommentTypeForm::entityTypeSupportsComments()
  2. 11.x core/modules/comment/src/CommentTypeForm.php \Drupal\comment\CommentTypeForm::entityTypeSupportsComments()

Wraps _comment_entity_uses_integer_id().

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: Entity type being tested.

Return value

bool TRUE if entity-type uses integer IDs.

1 call to CommentTypeForm::entityTypeSupportsComments()
CommentTypeForm::form in core/modules/comment/src/CommentTypeForm.php
Gets the actual form array to be built.

File

core/modules/comment/src/CommentTypeForm.php, line 167

Class

CommentTypeForm
Base form handler for comment type edit forms.

Namespace

Drupal\comment

Code

protected function entityTypeSupportsComments(EntityTypeInterface $entity_type) {
    return $entity_type->entityClassImplements(FieldableEntityInterface::class) && _comment_entity_uses_integer_id($entity_type->id());
}

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