Cms\Classes\Content
Overview
Content file class.
Extends
- Cms\Classes\CmsCompoundObject
- Cms\Classes\CmsObject
- October\Rain\Halcyon\Model
- October\Rain\Extension\Extendable
Implements
- ArrayAccess
- Illuminate\Contracts\Support\Arrayable
- Illuminate\Contracts\Support\Jsonable
- JsonSerializable
- Stringable
- Cms\Contracts\CmsObject
Public Properties
There are no public properties in the class.
Show inherited public properties
Inherited Public Properties
- $components - defined in the template file. (defined in Cms\Classes\CmsCompoundObject)
- $settings - defined in the template file. (defined in Cms\Classes\CmsCompoundObject)
- $viewBag - contains the view bag properties. (defined in Cms\Classes\CmsCompoundObject)
- $rules - The rules to be applied to the data. (defined in Cms\Classes\CmsObject)
- $attributeNames - The array of custom attribute names. (defined in Cms\Classes\CmsObject)
- $customMessages - The array of custom error messages. (defined in Cms\Classes\CmsObject)
- $attributes - saved to the settings area. (defined in October\Rain\Halcyon\Model)
- $exists - indicates if the model exists. (defined in October\Rain\Halcyon\Model)
- $implement - extensions for this class. (defined in October\Rain\Extension\Extendable)
Protected Properties
protected string $dirName
dirName associated with the model, eg: pages.
protected array $allowedExtensions
protected array $purgeable
purgeable attribute names which are not considered "settings".
protected string|null $parsedMarkupCache
parsedMarkupCache holds the markup with links resolved for this request.
Show inherited protected properties
Inherited Protected Properties
- $fillable - attributes that are mass assignable. (defined in Cms\Classes\CmsCompoundObject)
- $passthru - methods that should be returned from the collection of all objects. (defined in Cms\Classes\CmsCompoundObject)
- $isCompoundObject - for models that support code and settings sections. (defined in Cms\Classes\CmsCompoundObject)
- $objectComponentPropertyMap - is a request level cache for component properties, keyed by the cache key of the object they belong to. (defined in Cms\Classes\CmsCompoundObject)
- $viewBagCache - store for the getViewBag method. (defined in Cms\Classes\CmsCompoundObject)
- $themeCache - A reference to the CMS theme containing the object. (defined in Cms\Classes\CmsObject)
- $datasource - is the data source for the model, a directory path. (defined in October\Rain\Halcyon\Model)
- $original - attributes. (defined in October\Rain\Halcyon\Model)
- $appends - to the model's array form. (defined in October\Rain\Halcyon\Model)
- $defaultExtension - is default file extension. (defined in October\Rain\Halcyon\Model)
- $wrapCode - section in PHP tags. (defined in October\Rain\Halcyon\Model)
- $maxNesting - is the maximum allowed path nesting level. (defined in October\Rain\Halcyon\Model)
- $loadedFromCache - indicates whether the object was loaded from the cache. (defined in October\Rain\Halcyon\Model)
- $cache - manager. (defined in October\Rain\Halcyon\Model)
- $resolver - instance. (defined in October\Rain\Halcyon\Model)
- $mutatorCache - for each class. (defined in October\Rain\Halcyon\Model)
- $booted - models. (defined in October\Rain\Halcyon\Model)
- $traitInitializers - that will be called on each new instance. (defined in October\Rain\Halcyon\Model)
- $extensionData - contains class reflection information, including behaviors. (defined in October\Rain\Extension\Extendable)
- $extendableStaticMethods - is a collection of static methods used by behaviors. (defined in October\Rain\Extension\Extendable)
- $emitterSingleEventCollection - of events to be fired once only. (defined in October\Rain\Halcyon\Model)
- $emitterEventCollection - of all registered events. (defined in October\Rain\Halcyon\Model)
- $emitterEventSorted - collection. (defined in October\Rain\Halcyon\Model)
- $eventsBooted - is the array of models booted events. (defined in October\Rain\Halcyon\Model)
- $dispatcher - instance. (defined in October\Rain\Halcyon\Model)
- $observables - are user exposed observable events. (defined in October\Rain\Halcyon\Model)
- $validationErrors - message bag. (defined in Cms\Classes\CmsObject)
- $validator - instance. (defined in Cms\Classes\CmsObject)
Public Methods
public static findLocalized()
public static findLocalized(
Cms\Classes\Theme $theme,
string $fileName,
string|null $locale = null
): static|null
findLocalized returns a content file from a locale subdirectory, falling back to the base file when no translation exists.
public getParsedMarkupAttribute()
public getParsedMarkupAttribute(): string
getParsedMarkupAttribute returns the parsed markup with page links resolved.
public static initCacheItem()
public static initCacheItem(array &$item): void
initCacheItem initializes the object properties from the cached data. The extra data set here becomes available as attributes set on the model after fetch.
public isMarkupProcessable()
public isMarkupProcessable(): bool
isMarkupProcessable returns true when the content type supports link and snippet processing.
public parseMarkup()
public parseMarkup(): string
parseMarkup converts the file type to HTML, the result is safe to cache since it does not depend on the request.
Inherited Public Methods
- __call() - dynamically handles calls into the query instance. (defined in Cms\Classes\CmsCompoundObject)
- __callStatic() - handles dynamic static method calls into the method. (defined in October\Rain\Halcyon\Model)
- __construct() - a new Halcyon model instance. (defined in October\Rain\Halcyon\Model)
- __get() - functionality for visible properties defined in. (defined in Cms\Classes\CmsCompoundObject)
- __isset() - determines if an attribute exists on the object. (defined in Cms\Classes\CmsCompoundObject)
- __set() - dynamically sets attributes on the model. (defined in Cms\Classes\CmsCompoundObject)
- __sleep() - prepare the object for serialization. (defined in October\Rain\Halcyon\Model)
- __toString() - converts the model to its string representation. (defined in October\Rain\Halcyon\Model)
- __unset() - an attribute on the model. (defined in October\Rain\Halcyon\Model)
- __wakeup() - when a model is being unserialized, check if it needs to be booted. (defined in October\Rain\Halcyon\Model)
- addDynamicMethod() - programmatically adds a method to the extendable class. (defined in October\Rain\Extension\Extendable)
- addDynamicProperty() - programmatically adds a property to the extendable class. (defined in October\Rain\Extension\Extendable)
- addFillable() - adds fillable attributes for the model. (defined in October\Rain\Halcyon\Model)
- addObservableEvents() - name. (defined in October\Rain\Halcyon\Model)
- addPurgeable() - adds an attribute to the purgeable attributes list. (defined in October\Rain\Halcyon\Model)
- afterFetch() - event. (defined in Cms\Classes\CmsCompoundObject)
- all() - of the models from the datasource. (defined in October\Rain\Halcyon\Model)
- asExtension() - is short hand for
getClassExtension()method, except takes the short. (defined in October\Rain\Extension\Extendable) - attributesToArray() - converts the model's attributes to an array. (defined in October\Rain\Halcyon\Model)
- beforeSave() - event. (defined in Cms\Classes\CmsCompoundObject)
- bindEvent() - creates a new event binding. (defined in October\Rain\Halcyon\Model)
- bindEventOnce() - creates a new event binding that fires once only. (defined in October\Rain\Halcyon\Model)
- bootValidation() - trait for this model. (defined in Cms\Classes\CmsObject)
- cacheMutatedAttributes() - extracts and cache all the mutated attributes of a class. (defined in October\Rain\Halcyon\Model)
- clearBootedModels() - clears the list of booted models so they will be re-booted. (defined in October\Rain\Halcyon\Model)
- clearCache() - clears the object cache. (defined in Cms\Classes\CmsCompoundObject)
- clearExtendedClasses() - (defined in October\Rain\Extension\Extendable)
- create() - saves a new model and return the instance. (defined in October\Rain\Halcyon\Model)
- created() - Register a created model event with the dispatcher. (defined in October\Rain\Halcyon\Model)
- creating() - Register a creating model event with the dispatcher. (defined in October\Rain\Halcyon\Model)
- delete() - the model from the database. (defined in October\Rain\Halcyon\Model)
- deleted() - Register a deleted model event with the dispatcher. (defined in October\Rain\Halcyon\Model)
- deleting() - Register a deleting model event with the dispatcher. (defined in October\Rain\Halcyon\Model)
- errors() - gets validation error message collection for the Model. (defined in Cms\Classes\CmsObject)
- extend() - this class with a closure. (defined in October\Rain\Extension\Extendable)
- extendClassWith() - dynamically extends a class with a specified behavior. (defined in October\Rain\Extension\Extendable)
- extendableCall() - magic method for
__call(). (defined in October\Rain\Extension\Extendable) - extendableCallStatic() - magic method for
__callStatic(). (defined in October\Rain\Extension\Extendable) - extendableConstruct() - should be called as part of the constructor. (defined in October\Rain\Extension\Extendable)
- extendableDestruct() - should be called when serializing the object. (defined in October\Rain\Extension\Extendable)
- extendableExtendCallback() - is a helper method for
::extend()static method. (defined in October\Rain\Extension\Extendable) - extendableGet() - magic method for
__get(). (defined in October\Rain\Extension\Extendable) - extendableSet() - magic method for
__set(). (defined in October\Rain\Extension\Extendable) - fetched() - Create a new native event for handling afterFetch(). (defined in October\Rain\Halcyon\Model)
- fetching() - Create a new native event for handling beforeFetch(). (defined in October\Rain\Halcyon\Model)
- fill() - the model with an array of attributes. (defined in October\Rain\Halcyon\Model)
- fireEvent() - and call the listeners. (defined in October\Rain\Halcyon\Model)
- flushEventListeners() - removes all of the event listeners for the model. (defined in October\Rain\Halcyon\Model)
- forceSave() - the model even if validation fails. (defined in Cms\Classes\CmsObject)
- getAllowedExtensions() - returns the allowable file extensions supported by this model. (defined in October\Rain\Halcyon\Model)
- getAttribute() - gets a plain attribute. (defined in October\Rain\Halcyon\Model)
- getAttributes() - gets all of the current attributes on the model. (defined in October\Rain\Halcyon\Model)
- getBaseFileName() - Returns the file name without the extension. (defined in Cms\Classes\CmsObject)
- getBaseFileNameAttribute() - returns the file name without the extension. (defined in October\Rain\Halcyon\Model)
- getCacheManager() - instance. (defined in October\Rain\Halcyon\Model)
- getClassExtension() - returns a behavior object from an extendable class, example:. (defined in October\Rain\Extension\Extendable)
- getClassMethodAsReflector() - (defined in October\Rain\Extension\Extendable)
- getClassMethods() - gets a list of class methods, extension equivalent of get_class_methods(). (defined in October\Rain\Extension\Extendable)
- getComponent() - returns a component by its name. (defined in Cms\Classes\CmsCompoundObject)
- getComponentProperties() - returns component property names and values. (defined in Cms\Classes\CmsCompoundObject)
- getContent() - Returns the file content. (defined in Cms\Classes\CmsObject)
- getDatasource() - for the model. (defined in October\Rain\Halcyon\Model)
- getDatasourceName() - for the model. (defined in October\Rain\Halcyon\Model)
- getDatasourceResolver() - instance. (defined in October\Rain\Halcyon\Model)
- getDirty() - get the attributes that have been changed since last sync. (defined in October\Rain\Halcyon\Model)
- getDynamicProperties() - returns all dynamic properties and their values. (defined in October\Rain\Extension\Extendable)
- getEventDispatcher() - instance. (defined in October\Rain\Halcyon\Model)
- getFileName() - Returns the file name. (defined in Cms\Classes\CmsObject)
- getFileNameParts() - returns the base file name and extension. (defined in October\Rain\Halcyon\Model)
- getFilePath() - Returns the full path to the template file corresponding to this object. (defined in Cms\Classes\CmsObject)
- getId() - Helper for {{ page.id }} or {{ layout.id }} twig vars. (defined in Cms\Classes\CmsObject)
- getIdAttribute() - is a helper for {{ page.id }} or {{ layout.id }} twig vars. (defined in October\Rain\Halcyon\Model)
- getMaxNesting() - returns the maximum directory nesting allowed by this template. (defined in October\Rain\Halcyon\Model)
- getModelValidator() - instance. (defined in Cms\Classes\CmsObject)
- getMutatedAttributes() - gets the mutated attributes for a given instance. (defined in October\Rain\Halcyon\Model)
- getObjectTypeDirName() - returns the directory name corresponding to the object type. (defined in October\Rain\Halcyon\Model)
- getObservableEvents() - names. (defined in October\Rain\Halcyon\Model)
- getOriginal() - gets the model's original attribute values. (defined in October\Rain\Halcyon\Model)
- getSettingsAttribute() - is the settings is attribute contains everything that should. (defined in October\Rain\Halcyon\Model)
- getThemeAttribute() - Returns the CMS theme this object belongs to. (defined in Cms\Classes\CmsObject)
- getTwigCacheKey() - Returns the key used by the Twig cache. (defined in Cms\Classes\CmsObject)
- getTwigContent() - returns the Twig content string. (defined in Cms\Classes\CmsCompoundObject)
- getTwigNodeTree() - returns Twig node tree generated from the object's markup. (defined in Cms\Classes\CmsCompoundObject)
- getViewBag() - returns the configured view bag component. (defined in Cms\Classes\CmsCompoundObject)
- getWrapCode() - returns true if the code section will be wrapped in PHP tags. (defined in October\Rain\Halcyon\Model)
- hasComponent() - checks if the object has a component with the specified name. Returns. (defined in Cms\Classes\CmsCompoundObject)
- hasGetMutator() - determines if a get mutator exists for an attribute. (defined in October\Rain\Halcyon\Model)
- hasSetMutator() - determines if a set mutator exists for an attribute. (defined in October\Rain\Halcyon\Model)
- hydrate() - creates a collection of models from plain arrays. (defined in October\Rain\Halcyon\Model)
- implementClassWith() - will implement an extension using non-interference and should. (defined in October\Rain\Extension\Extendable)
- inTheme() - prepares the theme datasource for the model. (defined in Cms\Classes\CmsObject)
- isAttributeRequired() - determines if an attribute is required based on the validation rules. (defined in Cms\Classes\CmsObject)
- isClassExtendedWith() - checks if extendable class is extended with a behavior object. (defined in October\Rain\Extension\Extendable)
- isClassInstanceOf() - checks if the class implements the supplied interface methods. (defined in October\Rain\Extension\Extendable)
- isCompoundObject() - returns true if this template supports code and settings sections. (defined in October\Rain\Halcyon\Model)
- isDirty() - determines if the model or given attribute(s) have been modified. (defined in October\Rain\Halcyon\Model)
- isFillable() - determines if the given attribute may be mass assigned. (defined in October\Rain\Halcyon\Model)
- isLoadedFromCache() - returns true if the object was loaded from the cache. (defined in October\Rain\Halcyon\Model)
- jsonSerialize() - converts the object into something JSON serializable. (defined in October\Rain\Halcyon\Model)
- listInTheme() - returns the list of objects in the specified theme. (defined in Cms\Classes\CmsObject)
- load() - the object from a file. (defined in Cms\Classes\CmsObject)
- loadCached() - loads the object from a cache. (defined in Cms\Classes\CmsObject)
- methodExists() - checks if a method exists, extension equivalent of method_exists(). (defined in October\Rain\Extension\Extendable)
- newCollection() - creates a new Collection instance. (defined in Cms\Classes\CmsCompoundObject)
- newFromBuilder() - creates a new model instance that is existing. (defined in October\Rain\Halcyon\Model)
- newInstance() - creates a new instance of the given model. (defined in October\Rain\Halcyon\Model)
- newQuery() - Get a new query builder for the object. (defined in October\Rain\Halcyon\Model)
- offsetExists() - determines if the given attribute exists. (defined in October\Rain\Halcyon\Model)
- offsetGet() - the value for a given offset. (defined in October\Rain\Halcyon\Model)
- offsetSet() - the value for a given offset. (defined in October\Rain\Halcyon\Model)
- offsetUnset() - the value for a given offset. (defined in October\Rain\Halcyon\Model)
- on() - begins querying the model on a given datasource. (defined in October\Rain\Halcyon\Model)
- propertyExists() - checks if a property exists, extension equivalent of
property_exists(). (defined in October\Rain\Extension\Extendable) - query() - begins querying the model. (defined in October\Rain\Halcyon\Model)
- removeObservableEvents() - name. (defined in October\Rain\Halcyon\Model)
- resolveDatasource() - instance. (defined in October\Rain\Halcyon\Model)
- runComponents() - defined in the settings, this process halts. (defined in Cms\Classes\CmsCompoundObject)
- save() - the object to the theme. (defined in Cms\Classes\CmsObject)
- saveInternal() - Save the model to the database. Is used by {@link save()} and {@link forceSave()}. (defined in October\Rain\Halcyon\Model)
- saved() - Register a saved model event with the dispatcher. (defined in October\Rain\Halcyon\Model)
- saving() - Register a saving model event with the dispatcher. (defined in October\Rain\Halcyon\Model)
- setAttribute() - sets a given attribute on the model. (defined in October\Rain\Halcyon\Model)
- setCacheManager() - instance. (defined in October\Rain\Halcyon\Model)
- setDatasource() - associated with the model. (defined in October\Rain\Halcyon\Model)
- setDatasourceResolver() - instance. (defined in October\Rain\Halcyon\Model)
- setEventDispatcher() - instance. (defined in October\Rain\Halcyon\Model)
- setFileNameAttribute() - wjere file name should always contain an extension. (defined in October\Rain\Halcyon\Model)
- setLoadedFromCache() - returns true if the object was loaded from the cache. (defined in October\Rain\Halcyon\Model)
- setModelValidator() - instance. (defined in Cms\Classes\CmsObject)
- setObservableEvents() - names. (defined in October\Rain\Halcyon\Model)
- setRawAttributes() - sets the array of model attributes. No checking is done. (defined in October\Rain\Halcyon\Model)
- setSettingsAttribute() - filling the settings should merge it with attributes. (defined in October\Rain\Halcyon\Model)
- syncOriginal() - attributes with the current. (defined in October\Rain\Halcyon\Model)
- syncOriginalAttribute() - syncs a single original attribute with its current value. (defined in October\Rain\Halcyon\Model)
- toArray() - returns an array representation of the object. (defined in Cms\Classes\CmsCompoundObject)
- toJson() - converts the model instance to JSON. (defined in October\Rain\Halcyon\Model)
- unbindEvent() - destroys an event binding. (defined in October\Rain\Halcyon\Model)
- unsetCacheManager() - for models. (defined in October\Rain\Halcyon\Model)
- unsetDatasourceResolver() - for models. (defined in October\Rain\Halcyon\Model)
- unsetEventDispatcher() - for models. (defined in October\Rain\Halcyon\Model)
- unsetModelValidator() - for models. (defined in Cms\Classes\CmsObject)
- update() - Update the model in the database. (defined in October\Rain\Halcyon\Model)
- updated() - Register an updated model event with the dispatcher. (defined in October\Rain\Halcyon\Model)
- updating() - Register an updating model event with the dispatcher. (defined in October\Rain\Halcyon\Model)
- validate() - the model instance. (defined in Cms\Classes\CmsObject)
- validated() - creates a new native event for handling afterValidate(). (defined in Cms\Classes\CmsObject)
- validating() - creates a new native event for handling beforeValidate(). (defined in Cms\Classes\CmsObject)
Protected Methods
Show inherited protected methods
Inherited Protected Methods
- afterBoot() - is called after the model is constructed for the first time. (defined in October\Rain\Halcyon\Model)
- afterCreate() - handles the "created" model event. (defined in October\Rain\Halcyon\Model)
- afterDelete() - handles the "deleted" model event. (defined in October\Rain\Halcyon\Model)
- afterInit() - is called after the model is constructed, a nicer version. (defined in October\Rain\Halcyon\Model)
- afterSave() - handles the "saved" model event. (defined in October\Rain\Halcyon\Model)
- afterUpdate() - handles the "updated" model event. (defined in October\Rain\Halcyon\Model)
- beforeCreate() - handles the "creating" model event. (defined in October\Rain\Halcyon\Model)
- beforeDelete() - handles the "deleting" model event. (defined in October\Rain\Halcyon\Model)
- beforeFetch() - handles the "fetching" model event. (defined in October\Rain\Halcyon\Model)
- beforeUpdate() - handles the "updating" model event. (defined in October\Rain\Halcyon\Model)
- boot() - the model. (defined in Cms\Classes\CmsObject)
- bootDefaultTheme() - and all of the bootable traits on the model. (defined in Cms\Classes\CmsObject)
- bootIfNotBooted() - checks if the model needs to be booted and if so, do it. (defined in October\Rain\Halcyon\Model)
- bootNicerEvents() - binds some nicer events to this model, in the format of method overrides. (defined in October\Rain\Halcyon\Model)
- bootTraits() - boots all of the bootable traits on the model. (defined in October\Rain\Halcyon\Model)
- booted() - performs any actions required after the model boots. (defined in October\Rain\Halcyon\Model)
- booting() - performs any actions required before the model boots. (defined in October\Rain\Halcyon\Model)
- checkSafeMode() - checks if safe mode is enabled by config, and the code. (defined in Cms\Classes\CmsCompoundObject)
- emitterEventSortEvents() - sorts the listeners for a given event by priority. (defined in October\Rain\Halcyon\Model)
- extendableIsAccessible() - checks if a property is accessible, property equivalent. (defined in October\Rain\Extension\Extendable)
- extensionExtractImplements() - will return classes to implement. (defined in October\Rain\Extension\Extendable)
- extensionExtractMethods() - extracts the available methods from a behavior and adds it. (defined in October\Rain\Extension\Extendable)
- fillViewBagArray() - copies view bag properties to the view bag array. (defined in Cms\Classes\CmsCompoundObject)
- fillableFromArray() - gets the fillable attributes of a given array. (defined in October\Rain\Halcyon\Model)
- finishSave() - Finish processing on a successful save operation. (defined in October\Rain\Halcyon\Model)
- fireModelEvent() - for the model. (defined in October\Rain\Halcyon\Model)
- getArrayableAppends() - gets all of the appendable values that are arrayable. (defined in October\Rain\Halcyon\Model)
- getAttributeFromArray() - gets an attribute from the $attributes array. (defined in October\Rain\Halcyon\Model)
- getComponentPropertyGeneration() - returns the current cache generation for a theme. (defined in Cms\Classes\CmsCompoundObject)
- getExtendableMethodFromDynamicMethods() - (defined in October\Rain\Extension\Extendable)
- getExtendableMethodFromExtensions() - (defined in October\Rain\Extension\Extendable)
- getValidationAttributes() - returns the model data used for validation. (defined in Cms\Classes\CmsObject)
- initializeModelEvent() - is called every time the model is constructed. (defined in October\Rain\Halcyon\Model)
- initializeTraits() - on the model. (defined in October\Rain\Halcyon\Model)
- makeComponentPropertyCacheKey() - for this object. Each object caches under its. (defined in Cms\Classes\CmsCompoundObject)
- makeComponentPropertyGenerationKey() - (defined in Cms\Classes\CmsCompoundObject)
- makeValidator() - instantiates the validator used by the validation process, depending if the class is being used inside or. (defined in Cms\Classes\CmsObject)
- mutateAttribute() - gets the value of an attribute using its mutator. (defined in October\Rain\Halcyon\Model)
- mutateAttributeForArray() - gets the value of an attribute using its mutator for array conversion. (defined in October\Rain\Halcyon\Model)
- originalIsNumericallyEquivalent() - determine if the new and old values for a given key are. (defined in October\Rain\Halcyon\Model)
- parseComponentSettings() - parses component sections. (defined in Cms\Classes\CmsCompoundObject)
- parseSettings() - array. (defined in Cms\Classes\CmsCompoundObject)
- performDeleteOnModel() - performs the actual delete query on this model instance. (defined in October\Rain\Halcyon\Model)
- performInsert() - Perform a model insert operation. (defined in October\Rain\Halcyon\Model)
- performUpdate() - Perform a model update operation. (defined in October\Rain\Halcyon\Model)
- processRuleFieldNames() - converts any field names using array notation. (defined in Cms\Classes\CmsObject)
- processValidationRules() - (defined in Cms\Classes\CmsObject)
- registerModelEvent() - with the dispatcher. (defined in October\Rain\Halcyon\Model)
- throwHalcyonException() - Converts an exception type thrown by Halcyon to a native CMS exception. (defined in Cms\Classes\CmsObject)
- validateSettings() - if the model is loaded with an invalid INI section, the invalid content. (defined in Cms\Classes\CmsCompoundObject)