Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 247 to 258

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 27th April 2024 21:35 Europe/London time based on the source file dated 6th March 2024 14:45 Europe/London time.