As of Registry v4.0.0, frontend state (menu status, search filters, etc) can be stored using the ApplicationPreference model, which offers a simple key/value interface, linked to a CO Person ID.

$this->CoPerson->ApplicationPreference->store($coPersonId, "tag", "value");

$value = $this->CoPerson->ApplicationPreference->retrieve($coPersonId, "tag");

Only use an authenticated CO Person ID, since the model performs no authorization checks.

Only one value can be maintained for a given tag for each CO Person. If a previous entry for tag is found on store, it will be replaced (or more accurately archived via Changelog Behavior).

Application Preferences are currently accessible on via the Cake model layer, there is no REST API or user interface.

See also: cm_application_preferences

  • No labels