Page HTMLPage AdministrationPage ResourcesPage

public abstract class ResourcesPage extends AdministrationPage

class.resourcespage.php #15

The ResourcesPage abstract class controls the way "Datasource" and "Events" index pages are displayed in the backend. It extends the AdministrationPage class.


void __actionIndex(integer $resource_type)

This function is called from the resources index when a user uses the With Selected, or Apply, menu. The type of resource is given by $resource_type. At this time the only two valid values, ResourceManager::RESOURCE_TYPE_EVENT or ResourceManager::RESOURCE_TYPE_DATASOURCE.

The function handles 'delete', 'attach', 'detach', 'attach all', 'detach all' actions.

  • $resource_type integerEither ResourceManager::RESOURCE_TYPE_EVENT or ResourceManager::RESOURCE_TYPE_DATASOURCE

void __viewIndex(integer $resource_type)

This function contains the minimal amount of logic for generating the index table of a given $resource_type. The table has name, source, pages release date and author columns. The values for these columns are determined by the resource's about() method.

As Datasources types can be installed using Providers, the Source column can be overridden with a Datasource's getSourceColumn method (if it exists).

  • $resource_type integerEither ResourceManager::RESOURCE_TYPE_EVENT or ResourceManager::RESOURCE_TYPE_DATASOURCE

array pagesFlatView()

This function creates an array of all page titles in the system.


An array of page titles

array sort(string $sort, string $order, array $params)

This method is invoked from the Sortable class and it contains the logic for sorting (or unsorting) the resource index. It provides a basic wrapper to the ResourceManager's fetch() method.

  • $sort stringThe field to sort on which should match one of the table's column names. If this is not provided the default will be determined by ResourceManager::getSortingField

  • $order stringThe direction to sort in, either 'asc' or 'desc'. If this is not provided the value will be determined by ResourceManager::getSortingOrder.

  • $params arrayAn associative array of params (usually populated from the URL) that this function uses. The current implementation will use type and unsort keys


An associative of the resource as determined by ResourceManager::fetch

See Also

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details