Drupal is a registered trademark of Dries Buytaert
cms 2.1.3 Update released for Drupal core (2.1.3)! drupal 10.5.11 Update released for Drupal core (10.5.11)! drupal 11.3.11 Update released for Drupal core (11.3.11)! drupal 11.2.13 Update released for Drupal core (11.2.13)! drupal 10.6.10 Update released for Drupal core (10.6.10)! cms 2.1.2 Update released for Drupal core (2.1.2)! drupal 11.1.10 Update released for Drupal core (11.1.10)! drupal 10.5.10 Update released for Drupal core (10.5.10)! drupal 10.4.10 Update released for Drupal core (10.4.10)! drupal 11.2.12 Update released for Drupal core (11.2.12)! drupal 11.3.10 Update released for Drupal core (11.3.10)! drupal 10.6.9 Update released for Drupal core (10.6.9)! drupal 10.6.8 Update released for Drupal core (10.6.8)! drupal 11.3.9 Update released for Drupal core (11.3.9)! drupal 11.3.8 Update released for Drupal core (11.3.8)! drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)!

Adds a simple API to determine if an Entity is publicly accessible or not.

/**
 * Determine if an entity is publicly visible.
 *
 * @param string $entity_type
 *   An entity type of $entity.
 * @param object $entity
 *   The entity object.
 * @param array $options
 *   An optional array of options to use when determining publicity.
 * @param array $data
 *   An optional array of additional data to use when determining publicity.
 *
 * @return bool
 *   TRUE if the entity is publicly visible, or FALSE otherwise.
 */
function entity_is_public($entity_type, $entity, array $options = array(), array $data = array())

This goes beyond simply checking entity_access() as an anonymous user, but also checks other conditions like the following:

  • Does the entity actually have a URI? Is the URI the frontpage path or a non-administrative path?
  • An optional check for requiring the entity to have a URL alias.
  • Is the entity going to be processed with the Rabbit hole module?

The module additionally provides an API for other modules to help determine if an entity is publicly accessible or not.

Activity

Total releases
1
First release
Jun 2026
Latest release
23 hours ago
Release cadence
Stability
0% stable

Releases

Version Type Release date
1.x-dev Dev Jun 4, 2026