museumplus_resource_functions.php
Table of Contents
Functions
- mplus_resource_get_data() : array<string|int, mixed>
- Get resource table columns relevant to the MuseumPlus integration
- mplus_resource_mark_validation_failed() : void
- Mark resource failed validating the MuseumPlus association
- mplus_resource_update_association() : void
- Mark resource module association as valid. This updates the MD5 hash for the current combination of "module name - MpID" and the valid technical ID retrieved from MuseumPlus.
- mplus_resource_clear_metadata() : void
- Clear resource metadata fields that are mapped to any of the modules configured by the plugin.
- mplus_resource_get_association_data() : array<string|int, mixed>
- Get all resources associated with a MuseumPlus module.
Functions
mplus_resource_get_data()
Get resource table columns relevant to the MuseumPlus integration
mplus_resource_get_data(array<string|int, mixed> $refs) : array<string|int, mixed>
Parameters
- $refs : array<string|int, mixed>
-
List of resource IDs
Return values
array<string|int, mixed>mplus_resource_mark_validation_failed()
Mark resource failed validating the MuseumPlus association
mplus_resource_mark_validation_failed(array<string|int, mixed> $resources) : void
Parameters
- $resources : array<string|int, mixed>
-
List of resource IDs (key) and computed MD5 hashes (value). mplus_compute_data_md5()
mplus_resource_update_association()
Mark resource module association as valid. This updates the MD5 hash for the current combination of "module name - MpID" and the valid technical ID retrieved from MuseumPlus.
mplus_resource_update_association(array<string|int, mixed> $resources, array<string|int, mixed> $md5s) : void
Parameters
- $resources : array<string|int, mixed>
-
List of resource IDs (key) and MuseumPlus technical ID - ie. "__id" - as value.
- $md5s : array<string|int, mixed>
-
List of resource IDs (key) and computed MD5 hashes (value). mplus_compute_data_md5()
mplus_resource_clear_metadata()
Clear resource metadata fields that are mapped to any of the modules configured by the plugin.
mplus_resource_clear_metadata(array<string|int, mixed> $refs) : void
Parameters
- $refs : array<string|int, mixed>
-
List of resource IDs
mplus_resource_get_association_data()
Get all resources associated with a MuseumPlus module.
mplus_resource_get_association_data(array<string|int, mixed> $filters) : array<string|int, mixed>
Parameters
- $filters : array<string|int, mixed>
-
Rules to filter results (if applicable). There are "flag" filters (e.g new_and_changed_associations filter) and filters that take arguments (e.g byref)