Drupal module providing EWP specific field types and other tools.
See the Erasmus Without Paper Architecture and Common Datatypes specification for more information.
Include the repository in your project's composer.json
file:
"repositories": [
...
{
"type": "vcs",
"url": "https://github.com/EuropeanUniversityFoundation/ewp_core"
}
],
Then you can require the package as usual:
composer require euf/ewp_core
Finally, install the module:
drush en ewp_core
The following field types become available in the Field UI so they can be added to any fieldable entity like any other field type:
- ASCII Printable Identifier
- HTTPS
- String with optional lang
- Multiline string with optional lang
- HTTP with optional lang
- Language tag only - added feature
- EQF qualification level (Wikipedia)
- Gender (uses codes from ISO/IEC 5218)
- Deprecated: CEFR language level (Wikipedia)
Not all data types are implemented, and some are already present in the Drupal ecosystem, such as:
- UUID (assigned to every entity by Drupal)
- Email (Email field in Drupal core)
- HTTP (Link field in Drupal core)
- Country (Country field from the Country module)
The Country module approach of using the country_manager
service from Drupal core can also be used within custom compound fields. In the case of language codes in compound fields, the list of options can be set in configuration.
This module ships with custom REST resources to expose the lists used for select options and language tags. See the official documentation on how to enable and configure these resources.