SectionsVariable

Type
Class
Namespace
Craft
Inherits
Craft\SectionsVariable
Since
1.0

Class SectionsVariable

See also http://craftcms.com

View source (opens new window)

# Public Methods

Method Description
getAllSections() Returns all sections.
getEditableSections() Returns all editable sections.
getSectionByHandle() Returns a section by its handle.
getSectionById() Returns a section by its ID.
getTotalEditableSections() Gets the total number of sections that are editable by the current user.
getTotalSections() Gets the total number of sections.

# getAllSections()

Signature

public array getAllSections ( $indexBy = null )

# getEditableSections()

Signature

public array getEditableSections ( $indexBy = null )

# getSectionByHandle()

Returns a section by its handle.

View source (opens new window)

Arguments

Returns

Craft\SectionModel, null (opens new window)

Signature

public Craft\SectionModel, null getSectionByHandle ( $handle )

# getSectionById()

Signature

public Craft\SectionModel, null getSectionById ( $sectionId )

# getTotalEditableSections()

Gets the total number of sections that are editable by the current user.

View source (opens new window)

Returns

integer (opens new window)

Signature

public integer getTotalEditableSections ( )

# getTotalSections()

Gets the total number of sections.

View source (opens new window)

Returns

integer (opens new window)

Signature

public integer getTotalSections ( )