- Symphony 2.7.6
-
› assets
14 -
› boot
15 -
› core
24 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
61 -
› interface
9 -
› toolkit
60 - Delegates101
- Deprecated28
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
public class ResourceManager
class.resourcemanager.php #13The ResourcesManager is a class used to collect some methods for both Datasources and Events.
Constants
static integer RESOURCE_TYPE_DS = 21
The integer value for datasource-type resources.
static integer RESOURCE_TYPE_EVENT = 20
The integer value for event-type resources.
Methods
static string __getExtensionFromHandle(
$type, $r_handle)
Given the type and handle of a resource, return the extension it belongs to.
Parameters
Returns
The extension handle.
static boolean attach(
$type, $r_handle, $page_id)
Given a resource type, a handle and a page, this function will attach the given handle (which represents either a datasource or event) to that page.
Parameters
static boolean detach(
$type, $r_handle, $page_id)
Given a resource type, a handle and a page, this function detaches the given handle (which represents either a datasource or event) to that page.
Parameters
static array fetch(
$type, $select, $where, $order_by)
This function will return an associative array of resource information. The
information returned is defined by the $select
parameter, which will allow
a developer to restrict what information is returned about the resource.
Optionally, $where
(not implemented) and $order_by
parameters allow a developer to
further refine their query.
Parameters
Returns
An associative array of resource information, formatted in the same way as the resource's manager listAll()
method.
static array getAttachedPages(
$type, $r_handle)
Given the resource handle, this function will return an associative array of Page information, filtered by the pages the resource is attached to.
Parameters
Returns
An associative array of Page information, according to the pages the resource is attached to.
static string getManagerFromType(
$type)
A method used to return the Manager for the given resource type.
Parameters
Returns
An string representing the name of the Manager class that handles the resource.
static string getSortingField(
$type)
Returns the axis a given resource type will be sorted by.
The following handles are available: name
, source
, release-date
and author
. Defaults to 'name'.
Parameters
Returns
The axis handle.
static string getSortingOrder(
$type)
Returns the sort order for a given resource type. Defaults to 'asc'.
Parameters
Returns
Either 'asc' or 'desc'.
static boolean setPages(
$type, $r_handle, $pages)
Given a resource type, a handle and an array of pages, this function will
ensure that the resource is attached to the given pages. Note that this
function will also remove the resource from all pages that are not provided
in the $pages
parameter.
Parameters
static void setSortingField(
$type, $sort, $write)
Saves the new axis a given resource type will be sorted by.
Parameters
static void setSortingOrder(
$type, $order, $write)
Saves the new sort order for a given resource type.