Page HTMLPage AdministrationPage ResourcesPage contentBlueprintsDatasources

public class contentBlueprintsDatasources extends ResourcesPage

content.blueprintsdatasources.php #15

The Datasource Editor page allows a developer to create new datasources from the four Symphony types, Section, Authors, Navigation, Dynamic XML, and Static XML

Properties

Methods

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, RESOURCE_TYPE_EVENT or RESOURCE_TYPE_DATASOURCE.

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

Parameters
  • $resource_type integerEither RESOURCE_TYPE_EVENT or RESOURCE_TYPE_DATASOURCE

void __actionNew(string $context, string $file)

Prior to deleting the Datasource file. Target file path is provided.

Parameters
  • $context string'/blueprints/datasources/'

  • $file stringThe path to the Datasource file

void __appendAuthorFilter(mixed $wrapper, mixed $h4_label, mixed $name, mixed $value, bool $templateOnly)
void __injectIncludedElements(mixed $shell, mixed $elements)
void __injectVarList(mixed $shell, mixed $vars)
static array|boolean __isValidURL(string $url, integer $timeout, string $error)

Given a $url and $timeout, this function will use the Gateway class to determine that it is a valid URL and returns successfully before the $timeout. If it does not, an error message will be returned, otherwise true.

Parameters
  • $timeout integerIf not provided, this will default to 6 seconds

  • $error stringIf this function returns false, this variable will be populated with the error message.

Returns

Returns an array with the 'data' if it is a valid URL, otherwise a string containing an error message.

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).

Parameters
  • $resource_type integerEither RESOURCE_TYPE_EVENT or RESOURCE_TYPE_DATASOURCE

static void injectAboutInformation(mixed $shell, mixed $details)
static void injectFilters(mixed $shell, mixed $filters, string $context, string $file, string $previous_file)

After editing the Datasource, the path to the Datasource file is provided

Parameters
  • $context string'/blueprints/datasources/'

  • $file stringThe path to the Datasource file

  • $previous_file stringThe path of the previous Datasource file in the case where a Datasource may have been renamed. To get the handle from this value, see DatasourceManager::__getHandleFromFilename

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