\NewsArticle
Synopsis
class NewsArticle
extends Page
{
- // members
- private static string $description = 'A news article page';
- private static array $db = ;
- private static array $has_one = ;
- private static array $many_many = ;
- private static array $defaults = ;
- private static array $summary_fields = ;
- private static string $default_sort = 'PublishDate DESC';
- private static bool $show_in_sitetree = false;
- private static bool $enable_attachments = true;
- private static bool $enable_images = true;
- private static bool $enable_summary = true;
- private static bool $enable_tags = true;
- private static bool $enable_featured_articles = true;
- private static string $image_folder = 'news/images';
- private static string $attachment_folder = 'news/attachments';
- private static string|bool $author_mode = 'string';
- // methods
- public FieldList getCMSFields()
- public void onBeforeWrite()
- public ArrayList LinkedTags()
- public string AuthorName()
- public DataList RelatedArticles()
- public DBField ArticleIsPublished()
- public string ShareLink()
Hierarchy
Extends
- Page
Members
private
- $attachment_folder
—
string
Folder where article attachments should be stored - $db — array
- $default_sort — string
- $defaults — array
- $description — string
- $enable_attachments
—
bool
Enable documents to be attached to articles - $enable_featured_articles
—
bool
Enable featured articles - $enable_images
—
bool
Enable images to be attached to articles - $enable_summary
—
bool
Enable a summary field on articles - $has_one — array
- $image_folder
—
string
Folder where article images should be stored - $many_many — array
- $show_in_sitetree
—
bool
Manage these pages in a gridfield, rather than site tree - $summary_fields — array
Methods
public
- ArticleIsPublished() — ArticleIsPublished - flag for summary_fields
- AuthorName() — Author Name
- LinkedTags() — Generates an ArrayList of this artices tags with Links
- RelatedArticles() — RelatedArticles - Returns a list of articles that share the same tags as this one
- getCMSFields()
- onBeforeWrite() — onBeforeWrite