- Symphony 2.6.8
-
› assets
14 -
› boot
14 -
› core
23 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
59 -
› interface
9 -
› toolkit
59 - Delegates92
- Deprecated27
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
Datasource SectionDatasource
public class SectionDatasource extends Datasource
class.datasource.section.php #17The SectionDatasource
allows a user to retrieve entries from a given
section on the Frontend. This datasource type exposes the filtering provided
by the Fields in the given section to narrow the result set down. The resulting
entries can be grouped, sorted and allows pagination. Results can be chained
from other SectionDatasource
's using output parameters.
Methods
boolean canProcessSystemParameters()
If this Datasource requires System Parameters to be output, this function will return true, otherwise false.
XMLElement execute(
$param_pool)
The meat of the Datasource, this function includes the datasource type's file that will preform the logic to return the data for this datasource It is passed the current parameters.
Parameters
Returns
The XMLElement to add into the XML for a page.
integer getSource()
Return's the Section ID that this datasource is using as it's source
XMLElement|boolean processEntry(Entry $entry)
Given an Entry object, this function will generate an XML representation of the Entry to be returned. It will also add any parameters selected by this datasource to the parameter pool.
Returns
Returns boolean when only parameters are to be returned.
void processFilters(
$where, $joins, $group)
This function iterates over dsParamFILTERS
and builds the relevant
$where
and $joins
parameters with SQL. This SQL is generated from
Field->buildDSRetrievalSQL
. A third parameter, $group
is populated
with boolean from Field->requiresSQLGrouping()
void processOutputParameters(Entry $entry, $field_id, $data)
Given an Entry object, a $field_id
and an array of $data
, this
function iterates over the dsParamPARAMOUTPUT
and will call the
field's (identified by $field_id
) getParameterPoolValue
function
to add parameters to the $this->_param_pool
.
XMLElement processRecordGroup(
$element, $group)
Given a name for the group, and an associative array that
contains three keys, attr
, records
and groups
. Grouping
of Entries is done by the grouping Field at a PHP level, not
through the Database.
Parameters
void processSystemParameters(Entry $entry)
Given an Entry object, this function will iterate over the dsParamPARAMOUTPUT
setting to see any of the Symphony system parameters need to be set.
The current system parameters supported are system:id
, system:author
and system:date
. If these parameters are found, the result is added
to the $param_pool
array using the key, ds-datasource-handle.parameter-name
For the moment, this function also supports the pre Symphony 2.3 syntax,
ds-datasource-handle
which did not support multiple parameters.
Parameters
void setAssociatedEntryCounts(XMLElement $xEntry, Entry $entry)
An entry may be associated to other entries from various fields through
the section associations. This function will set the number of related
entries as attributes to the main <entry>
element grouped by the
related entry's section.
Parameters
void setSource(
$source)
Set's the Section ID that this Datasource will use as it's source