You are here

public static function EntityReferenceDependencyManager::getAccessDeniedReason in Entity Reference Integrity 8

Build an access denied reason string.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity that has dependents.

bool $translate: Optional boolean to translate the string. Defaults to TRUE.

Return value

string

Overrides EntityReferenceDependencyManagerInterface::getAccessDeniedReason

File

src/EntityReferenceDependencyManager.php, line 59

Class

EntityReferenceDependencyManager
Calculate entity dependencies based on entity reference fields.

Namespace

Drupal\entity_reference_integrity

Code

public static function getAccessDeniedReason(EntityInterface $entity, bool $translate = TRUE) {
  return EntityReferenceIntegrityEntityHandler::getAccessDeniedReason($entity, $translate);
}