Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/colorfield/entity_serial
Calculates serial number based on entity type or bundle configuration.
https://github.com/colorfield/entity_serial
drupal drupal-8 drupal-module serial
Last synced: about 1 month ago
JSON representation
Calculates serial number based on entity type or bundle configuration.
- Host: GitHub
- URL: https://github.com/colorfield/entity_serial
- Owner: colorfield
- Created: 2018-07-19T13:04:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-23T20:00:31.000Z (over 6 years ago)
- Last Synced: 2024-11-08T01:12:15.563Z (3 months ago)
- Topics: drupal, drupal-8, drupal-module, serial
- Language: PHP
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Entity Serial
Per bundle computed serial number for entities.
The difference with the
[Serial](https://www.drupal.org/project/serial) module
is that the field value is not stored but computed.The sequence is preserved if entities from the bundle
are being deleted.### Use case
When a sequence within a bundle is needed (e.g. invoice number, ...).
### Configuration
Add the field to an entity type bundle (e.g. _Article_ content type).
Set the serial id to start from and the node id that will be used
as the first entity to count from.### Roadmap
- Optionally initialize values for existing entities
- Lightweight system wide configuration without per bundle field definition by implementing
_hook_entity_bundle_field_info()_ [WIP]### Related modules
- [Serial](https://www.drupal.org/project/serial)
- [Computed Fields](https://www.drupal.org/project/computed_field)