Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

remove_from_collection_link()

Description

Render a "remove from collection" link wherever such a function is shown in the UI

Parameters

ColumnTypeDefaultDescription
$resource integer
$search string ""
$class string ""
$onclick string '' Additional onclick code to call before returning false.
$basketmode false

Return

void

Location

include/collections_functions.php lines 2754 to 2768

Definition

 
function remove_from_collection_link($resource,$search="",$class=""string $onclick ''$basketmode false)
    {
    
# Generates a HTML link for removing a resource from a collection
    # The collection is referred to as the basket when in basket mode
    
global $lang$pagename;

    if (
$basketmode
        {
        return 
"<a class=\"removeFromCollection " $class "\" href=\"#\" title=\"" $lang["removefrombasket"] . "\" onClick=\"RemoveResourceFromCollection(event,'" $resource "','" $pagename "');{$onclick} return false;\" data-resource-ref=\"{$resource}\">";
        }
    else 
        {
        return 
"<a class=\"removeFromCollection " $class "\" href=\"#\" title=\"" $lang["removefromcurrentcollection"] . "\" onClick=\"RemoveResourceFromCollection(event,'" $resource "','" $pagename "');{$onclick} return false;\" data-resource-ref=\"{$resource}\">";
        }
    }

This article was last updated 11th May 2021 11:35 Europe/London time based on the source file dated 10th May 2021 09:15 Europe/London time.