Contents

Cms\Classes\Content

Overview

Content file class.

Extends
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

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


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.

Show inherited public methods

Inherited Public Methods

Protected Methods

Show inherited protected methods

Inherited Protected Methods