Overview

Packages

  • ClipIt
    • clipit
      • api
    • urjc
      • backend
  • Elgg
    • Core
      • Access
      • Authentication
      • Cache
      • Caches
      • Core
      • DataMode
        • Site
      • DataModel
        • Annotations
        • Entities
        • Extender
        • File
        • Importable
        • Loggable
        • Notable
        • Object
        • User
      • DataStorage
      • Exception
      • Exceptions
        • Stub
      • FileStore
        • Disk
      • Groups
      • Helpers
      • HMAC
      • Memcache
      • Metadata
      • Navigation
      • ODD
      • Output
      • Plugins
        • Settings
      • Sessions
      • SocialModel
        • Friendable
        • Locatable
      • WebServicesAPI
      • Widgets
      • XML
      • XMLRPC
    • Exceptions
      • Stub
  • None
  • PHP

Classes

  • UBCollection
  • UBEvent
  • UBFile
  • UBItem
  • UBMessage
  • UBSite
  • UBUser
  • Overview
  • Package
  • Class
  • Tree

Class UBCollection

<Class Description>

Abstract
Package: ClipIt\urjc\backend
License: Affero General Public License v3
Author: Pablo LlinĂ¡s Arnaiz <pebs74@gmail.com>, URJC JuxtaLearn Team
Located at UBCollection.php
Methods summary
public static boolean
# add_items( integer $id, array $item_array, string $rel_name, boolean $exclusive = false )

Adds Items to a Collection.

Adds Items to a Collection.

Parameters

$id
integer
$id Id from Collection to add Items to.
$item_array
array
$item_array Array of Item Ids to add.
$rel_name
string
$rel_name Name of the relationship to use.
$exclusive
boolean
$exclusive Whether the added items have an exclusive relationship with the collection.

Returns

boolean
Returns true if success, false if error
public static boolean
# set_items( integer $id, array $item_array, string $rel_name, boolean $exclusive = false )

Sets Items to a Collection.

Sets Items to a Collection.

Parameters

$id
integer
$id Id from Collection to add Items to.
$item_array
array
$item_array Array of Item Ids to set.
$rel_name
string
$rel_name Name of the relationship to use.
$exclusive
boolean
$exclusive Whether the added items have an exclusive relationship with the collection.

Returns

boolean
Returns true if success, false if error
public static int[]|boolean
# get_items( integer $id, string $rel_name, boolean $inverse = false )

Get Items from a Collection.

Get Items from a Collection.

Parameters

$id
integer
$id Id from Collection to get Items from.
$rel_name
string
$rel_name Name of the relationship linking the items.
$inverse
boolean
$inverse Whether the Id specified is in the first (false) or second (true) term of the relationship.

Returns

int[]|boolean
Returns an array of Item IDs, or false if error.
public static integer
# count_items( integer $id, string $rel_name, boolean $inverse = false, boolean $recursive = false )

Count the number of related items.

Count the number of related items.

Parameters

$id
integer
$id Item to count related items with.
$rel_name
string
$rel_name Name of the relationship
$inverse
boolean
$inverse position of the Item in the relationship (first = false, seccond = true)
$recursive
boolean
$recursive Whether to count recursively or not

Returns

integer
Number of items related with the one specified.
public static boolean
# remove_items( integer $id, array $item_array, string $rel_name )

Remove Items from a Collection.

Remove Items from a Collection.

Parameters

$id
integer
$id Id from Collection to remove Items from.
$item_array
array
$item_array Array of Item Ids to remove.
$rel_name
string
$rel_name Name of the relationship to use.

Returns

boolean
Returns true if success, false if error.
public static boolean
# remove_all_items( integer $id, string $rel_name )

Remove all items from a collection.

Remove all items from a collection.

Parameters

$id
integer
$id ID of the Collection to remove items from.
$rel_name
string
$rel_name Name of the relationship to use.

Returns

boolean
Returns true if success, false if error.
public static
# set_timestamp( mixed $id1, mixed $id2, mixed $rel_name, mixed $timestamp )
public static
# get_timestamp( mixed $id1, mixed $id2, mixed $rel_name )
API documentation generated by ApiGen 2.8.0