Collections functions
General functions
Render functions
Theme permission functions
Resource functions

getAnnotationTags()

Description

Get all tags of an annotation. Checks if a tag is attached to the resource,
allowing the user to search by it which is represented by the virtual column
"tag_searchable"

Parameters

ColumnTypeDefaultDescription
$annotation array

Return

array

Location

include/annotation_functions.php lines 249 to 260

Definition

 
function getAnnotationTags(array $annotation)
    {
    
$resource_ref   $annotation['resource'];
    
$annotation_ref $annotation['ref'];

    
$parameters=array("i"$resource_ref"i"$annotation_ref);
    return 
ps_query("
            SELECT " 
columns_in("node","n") . ",
                   (SELECT 'yes' FROM resource_node WHERE resource = ? AND node = ref) AS tag_searchable
              FROM node AS n
             WHERE ref IN (SELECT node FROM annotation_node WHERE annotation = ?);"
$parameters);
    }

This article was last updated 5th October 2022 12:05 Europe/London time based on the source file dated 29th July 2022 11:20 Europe/London time.