micahsheets\Model\NewsArticle
Synopsis
class NewsArticle
extends Page
{
- // members
- private static string $table_name = 'NewsArticle';
- private static string $icon = 'micahsheets/kh-news:client/images/newspaper-file.gif';
- private static array $db = ;
- private static array $has_one = ;
- private static array $owns = ;
- // methods
- public void getCMSFields()
- public void onBeforeWrite()
- public void onBeforePublish()
- public void onAfterPublish()
- protected void publishSection()
- public void Section()
- public void findSection()
- public void PartitionParent()
- public boolean HasExternalLink()
- public String Link()
- public void pagesAffectedByChanges()
Hierarchy
Extends
- Page
Members
private
- $db
- $has_one
—
array
The InternalFile is used when the news article is mostly contained in a file based item - if this is set, then the URL to the item is returned in the call to "Link" for this asset. - $icon
- $owns
- $table_name
Methods
protected
- publishSection() — Ensure's the section is published.
public
- HasExternalLink() — Indicates if this has an external URL link
- Link() — Link to the news article. If it has an external URL set, or a file, link to that instead.
- PartitionParent() — Gets the parent for this article page based on its section, and its creation date
- Section() — Get the top level parent of this article that is marked as a section
- findSection() — Find the section this news article is currently in, based on ancestor pages
- getCMSFields()
- onAfterPublish()
- onBeforePublish() — Make sure all parents are published when publishing a news article
- onBeforeWrite() — When the article is saved, and this article's section dictates that it needs to be filed, then do so
- pagesAffectedByChanges() — Pages to update cache file for static publisher