Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Entity is Public

Security covered Under active development

Part of the Entity ecosystem · 308 projects

This module provides a simple way to check if an entity is publicly accessible, going beyond just anonymous user access. It considers factors like whether the entity has a valid, non-administrative path and can optionally check for URL aliases. It also offers an API for other modules to contribute to this accessibility check.

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.

Drupal 10–11

Ask your assistant about Entity is Public

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Jun 2026
Latest release
4 months ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.0 Stable 10–11 Jun 5, 2026
1.0.x-dev Dev 10–11 Jun 5, 2026
1.x-dev Dev 10–11 Jun 4, 2026