SilverWare\Search\Items\SearchItem
An extension of the bar item class for a search item.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2017 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class SearchItem
extends BarItem
{
- // constants
- const MODE_ICON = 'icon';
- const MODE_FIELD = 'field';
- // members
- private static string $singular_name = 'Search Item';
- private static string $plural_name = 'Search Items';
- private static string $description = 'A bar item to show a search form for the site';
- private static string $table_name = 'SilverWare_Search_SearchItem';
- private static string $hide_ancestor = BarItem::class;
- private static array $db = ;
- private static array $defaults = ;
- private static array $casting = ;
- private static array $extensions = ;
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public array getClassNames()
- public array getLinkAttributes()
- public string getLinkAttributesHTML()
- public array getModeExpandedOptions()
- public boolean isField()
- public boolean isIcon()
- public DBHTMLText|string renderSelf()
Hierarchy
Extends
- SilverWare\Navigation\Model\BarItem
Constants
Name | Value |
---|---|
MODE_ICON | 'icon' |
MODE_FIELD | 'field' |
Members
private
- $casting
—
array
Maps field and method names to the class names of casting objects. - $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. - $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.
- getClassNames() — Answers an array of class names for the HTML template.
- getLinkAttributes() — Answers an array of attributes for the link element.
- getLinkAttributesHTML() — Answers a string of attributes for the link element.
- getModeExpandedOptions() — Answers an array of options for the mode expanded field.
- isField() — Answers true if the mode expanded is set to field.
- isIcon() — Answers true if the mode expanded is set to icon.
- renderSelf() — Renders the object for the HTML template.