SilverWare\Blog\Components\BlogArchiveComponent
An extension of the base component class for a blog archive component.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2018 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class BlogArchiveComponent
extends BaseComponent
{
- // members
- private static string $singular_name = 'Blog Archive Component';
- private static string $plural_name = 'Blog Archive Components';
- private static string $description = 'A component which shows an archive of blog posts by year and month';
- private static string $icon = 'silverware/blog: admin/client/dist/images/icons/BlogArchiveComponent.png';
- private static string $table_name = 'SilverWare_BlogArchiveComponent';
- private static string $hide_ancestor = BaseComponent::class;
- private static array|string $allowed_children = 'none';
- private static array $db = ;
- private static array $has_one = ;
- private static array $defaults = ;
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public array getClassNames()
- public ArrayList getArchive()
- public Map getBlogOptions()
- public string getNoDataMessage()
- public boolean isDisabled()
Hierarchy
Extends
- SilverWare\Components\BaseComponent
Members
private
- $allowed_children
—
SilverWare\Blog\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. - $has_one
—
array
Defines the has-one associations for 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.
- getArchive() — Answers a list of archive years with a series of months within.
- getBlogOptions() — Answers a map of options for the blog field.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getClassNames() — Answers an array of class names for the HTML template.
- getNoDataMessage() — Answers a message string to be shown when no data is available.
- isDisabled() — Answers true if the object is disabled within the template.