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
- String with optional lang
- Multiline string with optional lang
- HTTP with optional lang
- HTTPS
- CEFR language level (Wikipedia)
- EQF qualification level (Wikipedia)
- Gender (uses codes from ISO/IEC 5218)
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)
- Language (Language field from the Custom language field 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, a custom option set is provided in code.