TractorCow\Fluent\Model\RecordLocale
Object that represents details of a specific dataobject in a specific locale
Synopsis
class RecordLocale
extends ViewableData
{
- // members
- protected Locale $localeObject;
- protected DataObject $originalRecord;
- protected DataObject $record = NULL;
- // methods
- public void __construct()
- public Locale getLocaleObject()
- protected DataObject getOriginalRecord()
- public DataObject getRecord()
- public string getLocale()
- public string getLocaleRFC1766()
- public string getHrefLang()
- public string getURLSegment()
- public string getTitle()
- public string getLanguageNative()
- public string getLanguage()
- public bool canViewInLocale()
- public string|null getLink()
- public string|null getAbsoluteLink()
- public string getLinkingMode()
- public bool IsVisible()
- public bool IsPublished()
- public bool IsDraft()
- public bool getStagesDiffer()
- public Locale|null getSourceLocale()
Hierarchy
Extends
- SilverStripe\View\ViewableData
Members
protected
- $localeObject — TractorCow\Fluent\Model\Locale
- $originalRecord
—
SilverStripe\ORM\DataObject
Object with possibly either fluent or filtered extension - $record
—
SilverStripe\ORM\DataObject
Object in the appropriate locale (cached)
Methods
protected
- getOriginalRecord() — Get record (note: May not be localised in the correct locale)
public
- __construct() — FluentLocale constructor.
- IsDraft() — Check if record is visible on draft
- IsPublished() — Check if record is visible on live Set $inLocale to true if this record must be published in the specified locale.
- IsVisible() — Check if object is visible (ignore published status)
- canViewInLocale() — Check if this object can be viewed in this locale
- getAbsoluteLink()
- getHrefLang() — Get hreflang field
- getLanguage()
- getLanguageNative()
- getLink() — Get link to this object in the given locale
- getLinkingMode()
- getLocale() — Locale code
- getLocaleObject() — Get the locale object
- getLocaleRFC1766() — RFC1766 version of this locale
- getRecord() — Get localised record
- getSourceLocale() — Get the locale which is the source of content for this record
- getStagesDiffer() — Check if a record is published, but modified on draft useful to indicate that record has changes that need publishing
- getTitle() — Title of this language
- getURLSegment() — URLSegment of this language (not the record)