Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

This module provides a new type of entities that cannot be created or deleted using the Drupal UI. This is valid also for site administrators with full privileges.

Permanent entities can only be created and deleted by code (using hook_update_N or via drush commands). Edit permissions are available per bundle.

Use cases

The main use case of this module is to have regular entities that you don't want to be deleted by error by a content administrator. Also this usually applies for a set of content that rarely varies over time. Like the planets of the solar system, the districts of a city, weather season, etc.

Users will still be able to edit and translate this entities. But they won't be able to delete them, or create new ones using an user interface.

Mode of use

Before create a permanent entity, you will need to create a Permanent Entity Type. This can be done via admin/structure/permanent_entity_types Then you can create instances either using drush:

drush pec planet jupiter Jupiter

Or using PHP code:

    use Drupal\permanent_entities\Entity\PermanentEntity;
    PermanentEntity::create([
      'id' => 'jupiter',
      'label' => 'Jupiter',
      'type' => 'planet',
    ])->save();

Finally all permanent entities can be edited or translated via /admin/content/permanent_entities

Do you want to know more?

Checkout the documentation.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Nov 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Core Release date
2.0.0-beta7 Pre-release Nov 4, 2024
2.0.0-beta6 Pre-release Nov 1, 2024