- Symphony 2.7.9
-
› assets
14 -
› boot
15 -
› core
24 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
62 -
› 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 Section
class.section.php #14The Section class represents a Symphony Section object. A section is a model of a data structure using one or more Fields. Sections are stored in the database and are used as repositories for Entry objects, which are a model for this data structure. This class contains functions for finding Fields within a Section and saving a Section's settings.
Methods
boolean commit()
Commit the settings of this section from the section editor to
create an instance of this section in tbl_sections
. This function
loops of each of the fields in this section and calls their commit
function.
Returns
true if the commit was successful, false otherwise.
See Also
array fetchAssociatedSections(
$respect_visibility)
Returns any section associations this section has with other sections
linked using fields. Has an optional parameter, $respect_visibility
that
will only return associations that are deemed visible by a field that
created the association. eg. An articles section may link to the authors
section, but the field that links these sections has hidden this association
so an Articles column will not appear on the Author's Publish Index
Parameters
Deprecated
This function will be removed in Symphony 3.0. Use SectionManager::fetchChildAssociations
instead.
array fetchChildAssociations(
$respect_visibility)
Returns any section associations this section has with other sections
linked using fields, and where this section is the parent in the association.
Has an optional parameter, $respect_visibility
that
will only return associations that are deemed visible by a field that
created the association. eg. An articles section may link to the authors
section, but the field that links these sections has hidden this association
so an Articles column will not appear on the Author's Publish Index
Parameters
array fetchFields(
$type, $location)
Returns an array of all the fields in this section optionally filtered by the field type or it's location within the section.
Parameters
array fetchFieldsSchema()
Returns the Schema of this section which includes all this sections fields and their settings.
array fetchFilterableFields(
$location)
Returns an array of all the fields that can be filtered.
Parameters
array fetchParentAssociations(
$respect_visibility)
Returns any section associations this section has with other sections
linked using fields, and where this section is the child in the association.
Has an optional parameter, $respect_visibility
that
will only return associations that are deemed visible by a field that
created the association. eg. An articles section may link to the authors
section, but the field that links these sections has hidden this association
so an Articles column will not appear on the Author's Publish Index
Parameters
array fetchToggleableFields(
$location)
Returns an array of all the fields that can be toggled. This function is used to help build the With Selected drop downs on the Publish Index pages
Parameters
array fetchVisibleColumns()
Returns an array of all the fields in this section that are to be displayed on the entries table page ordered by the order in which they appear in the Section Editor interface
array|string get(
$setting)
An accessor function for this Section's settings. If the $setting param is omitted, an array of all settings will be returned. Otherwise it will return the data for the setting given.
Returns
If setting is provided, returns a string, if setting is omitted returns an associative array of this Section's settings
string getDefaultSortingField()
Returns the default field this Section will be sorted by.
This is determined by the first visible field that is allowed to
to be sorted (defined by the field's isSortable()
function).
If no fields exist or none of them are visible in the entries table,
'id' is returned instead.
Returns
Either the field ID or the string 'id'.
string getSortingField()
Returns the field this Section will be sorted by, or calls
getDefaultSortingField()
if the configuration file doesn't
contain any settings for that Section.
Returns
Either the field ID or the string 'id'.
string getSortingOrder()
Returns the sort order for this Section. Defaults to 'asc'.
Returns
Either 'asc' or 'desc'.
void set(
$setting, $value)
A setter function that will save a section's setting into
the poorly named $this->_data
variable
Parameters
void setSortingField(
$sort, $write)
Saves the new field this Section will be sorted by.
Parameters
void setSortingOrder(
$order, $write)
Saves the new sort order for this Section.