Drupal implementation of the EWP Organizational Units API.
See the Erasmus Without Paper specification for more information:
Include the repository in your project's composer.json file:
"repositories": [
...
{
"type": "vcs",
"url": "https://github.com/EuropeanUniversityFoundation/ewp_ounits"
}
],
Then you can require the package as usual:
composer require euf/ewp_ounits
Finally, install the module:
drush en ewp_ounits
A custom content entity named Organizational Unit is provided with initial configuration to match the EWP specification. It can be configured like any other fieldable entity on the system. The administration paths are placed under /admin/ewp/.
The Organizational Unit entity type includes constraint validation to ensure that:
ounit_codeandounit_idvalues are unique perparent_heivalue;parent_ounitcan only referenceounitentities with the sameparent_heivalue.
This module also has a dependency on the Entity reference validators contributed module to prevent circular (direct or recursive) references in parent_ounit.
The implementation of circular reference constraint validation is accomplished via third party settings, since parent_ounit is a bundle field (see config/install/field.field.ounit.ounit.parent_ounit.yml).
Note: Implementing the Entity reference validators on base fields requires custom code.