public class Section

class.section.php #15

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

Properties

mixed $_Parent

The class who initialised this Section, usually SectionManager

Methods

void __construct(mixed $parent)

The construct function sets the parent variable of this Section and initialises a new FieldManager object

Parameters
  • $parent mixedThe class that initialised this Section, usually SectionManager

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(bool $respect_visibility, boolean $respect_visibilty)

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
  • $respect_visibilty booleanWhether to return all the section associations regardless of if they are deemed visible or not. Defaults to false, which will return all associations.

array fetchFields(string $type, string $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
  • $type stringThe field type (it's handle as returned by $field->handle())

  • $location stringThe location of the fields in the entry creator, whether they are 'main' or 'sidebar'

array fetchFieldsSchema()

Returns the Schema of this section which includes all this sections fields and their settings.

array fetchFilterableFields(string $location)

Returns an array of all the fields that can be filtered.

Parameters
  • $location stringThe location of the fields in the entry creator, whether they are 'main' or 'sidebar'

Deprecated

This function will be removed in the next major release. It is unused by Symphony.

array fetchToggleableFields(string $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
  • $location stringThe location of the fields in the entry creator, whether they are 'main' or 'sidebar'

array fetchVisibleColumns()

Returns an array of all the fields in this section that are to be displayed on the entries tablepage ordered by the order in which they appear in the Section Editor interface

array|string get(mixed $setting)

An accessor function for this Section's settings. If the $setting param is omitted, an array of all setting 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

void set(string $setting, string $value)

A setter function that will save a section's setting into the poorly named $this->_data variable

Parameters
  • $setting stringThe setting name

  • $value stringThe setting value

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