SilverWare\Contact\Components\ContactComponent
An extension of the base component class for a contact component.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2017 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class ContactComponent
extends BaseComponent
{
- // constants
- const ITEM_MODE_BLOCK = 'block';
- const ITEM_MODE_INLINE = 'inline';
- const ITEM_MODE_LIST = 'list';
- // members
- private static string $singular_name = 'Contact Component';
- private static string $plural_name = 'Contact Components';
- private static string $description = 'A component which shows contact information';
- private static string $icon = 'silverware/contact: admin/client/dist/images/icons/ContactComponent.png';
- private static string $table_name = 'SilverWare_ContactComponent';
- private static string $hide_ancestor = BaseComponent::class;
- private static array $db = ;
- private static array $defaults = ;
- private static array|string $allowed_children = ;
- private static array $extensions = ;
- private static string $default_item_mode = 'block';
- private static string $heading_level_default = 'h4';
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public array getWrapperClassNames()
- public string getWrapperTag()
- public string getItemModeClass()
- public DataList getItems()
- public ArrayList getEnabledItems()
- public ContactItem getEnabledItemByClass()
- public string getHeadingTag()
- public array getCustomCSS()
- public boolean isDisabled()
- public boolean getIsList()
- public array getItemModeOptions()
Hierarchy
Extends
- SilverWare\Components\BaseComponent
Constants
Name | Value |
---|---|
ITEM_MODE_BLOCK | 'block' |
ITEM_MODE_INLINE | 'inline' |
ITEM_MODE_LIST | 'list' |
Members
private
- $allowed_children
—
SilverWare\Contact\Components\array|string
Defines the allowed children for this object. - $db
—
array
Maps field names to field types for this object. - $default_item_mode
—
string
Defines the default item mode to use. - $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. - $heading_level_default
—
array
Defines the default heading level to use. - $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.
- getCustomCSS() — Answers an array of custom CSS required for the template.
- getEnabledItemByClass() — Answers the first enabled item found matching the given class name.
- getEnabledItems() — Answers a list of the enabled items within the receiver.
- getHeadingTag() — Answers the heading tag for the receiver.
- getIsList() — Answers true if the receiver is set to list item mode.
- getItemModeClass() — Answers the item mode class for the receiver.
- getItemModeOptions() — Answers an array of options for the item mode field.
- getItems() — Answers a list of all items within the receiver.
- getWrapperClassNames() — Answers an array of wrapper class names for the HTML template.
- getWrapperTag() — Answers the tag for the item wrapper element.
- isDisabled() — Answers true if the object is disabled within the template.