- Symphony 2.6.6
-
› 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
public class SectionManager
class.sectionmanager.php #13The SectionManager
is responsible for managing all Sections in a Symphony
installation by exposing basic CRUD operations. Sections are stored in the
database in tbl_sections
.
Methods
static integer add(
$settings)
Takes an associative array of Section settings and creates a new
entry in the tbl_sections
table, returning the ID of the Section.
The ID of the section is generated using auto_increment and returned
as the Section ID.
Parameters
Returns
The newly created Section's ID
static Section create()
Returns a new Section object, using the SectionManager as the Section's $parent.
static boolean createSectionAssociation(
$parent_section_id, $child_field_id, $parent_field_id, $show_association, $interface, $editor)
Create an association between a section and a field.
Parameters
Returns
true if the association was successfully made, false otherwise.
static boolean delete(
$section_id)
Deletes a Section by Section ID, removing all entries, fields, the Section and any Section Associations in that order
Parameters
Returns
Returns true when completed
static boolean edit(
$section_id, $settings)
Updates an existing Section given it's ID and an associative array of settings. The array does not have to contain all the settings for the Section as there is no deletion of settings prior to updating the Section
Parameters
static Section|array fetch(
$section_id, $order, $sortfield)
Returns a Section object by ID, or returns an array of Sections if the Section ID was omitted. If the Section ID is omitted, it is possible to sort the Sections by providing a sort order and sort field. By default, Sections will be order in ascending order by their name
Parameters
Returns
A Section object or an array of Section objects
static array fetchAssociatedSections(
$section_id, $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 fetchChildAssociations
instead.
static array fetchChildAssociations(
$section_id, $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
static integer fetchIDFromHandle(
$handle)
Return a Section ID by the handle
Parameters
Returns
The Section ID
static integer fetchNextSortOrder()
Work out the next available sort order for a new section
Returns
Returns the next sort order
static array fetchParentAssociations(
$section_id, $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
static string getSectionAssociationSetting(
$field_id)
Returns the association settings for the given field id. This is to be used when configuring the field so we can correctly show the association setting the UI.
static boolean removeSectionAssociation(
$field_id)
Permanently remove a section association for this field in the database.