SilverWare\Contact\Items\LinkItem
An extension of the contact item class for a link 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 LinkItem
extends ContactItem
{
- // constants
- const MODE_PAGE = 'page';
- const MODE_URL = 'url';
- // members
- private static string $singular_name = 'Link Item';
- private static string $plural_name = 'Link Items';
- private static string $description = 'A contact item to show a link';
- private static string $table_name = 'SilverWare_Contact_LinkItem';
- private static string $hide_ancestor = ContactItem::class;
- private static array $db = ;
- private static array $has_one = ;
- private static array $defaults = ;
- // methods
- public FieldList getCMSFields()
- public RequiredFields getCMSValidator()
- public array fieldLabels()
- public string getPageLink()
- public boolean isPage()
- public boolean isURL()
- public boolean isDisabled()
- // Inherited methods from ContactItem
- public FieldList getCMSFields()
- public RequiredFields getCMSValidator()
- public array fieldLabels()
- public string getHeadingTag()
- public string getItemTag()
- public boolean getIsListItem()
- public boolean getShowIcon()
- public boolean getShowText()
- public boolean getShowTitle()
- public boolean getFontIconFixedWidth()
- public boolean getFontIconListItem()
- public null getContent()
- public DBHTMLText|string renderSelf()
- public DBHTMLText|string renderContent()
Hierarchy
Constants
Name | Value |
---|---|
MODE_PAGE | 'page' |
MODE_URL | 'url' |
Members
private
- $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. - $has_one
—
array
Defines the has-one associations for 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.
- getCMSValidator() — Answers a validator for the CMS interface.
- getPageLink() — Answers the page link for the template.
- isDisabled() — Answers true if the item is disabled within the template.
- isPage() — Answers true if the link is to a page.
- isURL() — Answers true if the link is to a URL.
Inherited from SilverWare\Contact\Model\ContactItem
public
- fieldLabels() — Answers the labels for the fields of the receiver.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getCMSValidator() — Answers a validator for the CMS interface.
- getContent() — Answers null to avoid problems with '$Content' double-ups in the template.
- getFontIconFixedWidth() — Answers true to enable fixed width mode.
- getFontIconListItem() — Answers true to enable list item mode.
- getHeadingTag() — Answers the heading tag for the receiver.
- getIsListItem() — Answers true if the receiver is a list item.
- getItemTag() — Answers the item tag for the receiver.
- getShowIcon() — Answers true if the font icon is to be shown.
- getShowText() — Answers true if the title text is to be shown.
- getShowTitle() — Answers true if the title is to be shown in the template.
- renderContent() — Renders the content for the HTML template.
- renderSelf() — Renders the object for the HTML template.