Collections functions
Encryption functions
General 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 243 to 254

Definition

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

    return 
sql_query("
            SELECT *,
                   (SELECT 'yes' FROM resource_node WHERE resource = '
{$resource_ref}' AND node = ref) AS tag_searchable
              FROM node AS n
             WHERE ref IN (SELECT node FROM annotation_node WHERE annotation = '
{$annotation_ref}');
        "
);
    }

This article was last updated 7th July 2020 09:05 Europe/London time based on the source file dated 17th January 2020 16:11 Europe/London time.