Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

get_annotate_fields()

Description

Get (viewable) "annotate_fields" config. The configs' value is validated (e.g. view access, supported type,
active RTF, excluded RT, etc.).

Parameters

ColumnTypeDefaultDescription
array { :
SORT_NUMERIC
metadata_field_view_access...
get_all_viable_annotate_metadata_fields$GLOBALS['annotate_exclude_restypes']

Location

include/annotation_functions.php lines 9 to 24

Definition

 
function get_annotate_fields(): array
{
    return 
array_unique(
        
array_merge(
            
// Zero is a pseudo-RTF used for comment (text) annotations (i.e not field bound)
            
$GLOBALS['annotate_text_adds_comment'] && (!$GLOBALS['annotate_public_view'] || ($GLOBALS['k'] ?? '') === '')
                ? [
0]
                : [],
            
array_intersect(
                
array_filter($GLOBALS['annotate_fields'], metadata_field_view_access(...)),
                
get_all_viable_annotate_metadata_fields($GLOBALS['annotate_exclude_restypes'])
            )
        ),
        
SORT_NUMERIC
    
);
}

This article was last updated 4th July 2025 20:05 Europe/London time based on the source file dated 4th July 2025 10:35 Europe/London time.