← Back to Awards Plugin

5.2.2 Awards LevelsTable Reference

This stable page supports source-code links. Exact API details live in app/plugins/Awards/src/Model/Table/LevelsTable.php and generated documentation.

LevelsTable manages awards_levels, the tenant-configured level/precedence categories used to organize awards and approval authority. It has many Awards and uses timestamp, footprint, and soft-delete behaviors.

getAllLevelNames() is the shared lightweight level-name lookup. Validation and application rules keep names/order data valid and prevent invalid associations.

Authorization and changes

Use LevelPolicy for entity actions and LevelsTablePolicy for collection/grid actions. Do not infer permission from the numeric order alone; recommendation approval can use dynamic canApproveLevel* policies derived from level names. Renaming a level can therefore affect permission configuration and deserves migration/authorization tests.

Levels are tenant data. Cache lookups with tenant-aware keys and do not assume two tenants share IDs, names, or ordering.