SilverWare\Navigation\Components\LevelNavigation
An extension of the base component class for level navigation.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2017 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class LevelNavigation
extends BaseComponent
{
- // constants
- const SORT_ORDER = 'order';
- const SORT_TITLE = 'title';
- // members
- private static string $singular_name = 'Level Navigation';
- private static string $plural_name = 'Level Navigation';
- private static string $description = 'A component which shows navigation for the current page level';
- private static string $icon = 'silverware/navigation: admin/client/dist/images/icons/LevelNavigation.png';
- private static string $table_name = 'SilverWare_LevelNavigation';
- private static string $hide_ancestor = BaseComponent::class;
- private static array|string $allowed_children = 'none';
- private static array $db = ;
- private static array $defaults = ;
- private static array $extensions = ;
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public string getTitleText()
- public array getWrapperClassNames()
- public array getListClassNames()
- public boolean getFontIconListItem()
- public SiteTree getLevel()
- public ArrayList getCurrentLevel()
- public boolean isDisabled()
- public string getSortOrder()
- public array getSortByOptions()
Hierarchy
Extends
- SilverWare\Components\BaseComponent
Constants
Name | Value |
---|---|
SORT_ORDER | 'order' |
SORT_TITLE | 'title' |
Members
private
- $allowed_children
—
SilverWare\Navigation\Components\array|string
Defines the allowed children for this object. - $db
—
array
Maps field names to field types for this object. - $defaults
—
array
Defines the default values for the fields of this object. - $description
—
string
Description of this object. - $extensions
—
array
Defines the extension classes to apply to this object. - $hide_ancestor
—
string
Defines an ancestor class to hide from the admin interface. - $icon
—
string
Icon file for this object. - $plural_name
—
string
Human-readable plural name. - $singular_name
—
string
Human-readable singular name. - $table_name
—
string
Defines the table name to use for this object.
Methods
public
- fieldLabels() — Answers the labels for the fields of the receiver.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getCurrentLevel() — Answers a list of the child pages within the current level.
- getFontIconListItem() — Answers true to enable list item mode.
- getLevel() — Answers the page object at the current level.
- getListClassNames() — Answers an array of list class names for the HTML template.
- getSortByOptions() — Answers an array of options for the sort by field.
- getSortOrder() — Answers the sort order for the level navigation.
- getTitleText() — Answers the title of the component for the template.
- getWrapperClassNames() — Answers an array of wrapper class names for the HTML template.
- isDisabled() — Answers true if the object is disabled within the template.