PHP Класс Bolt\Legacy\Content

Устаревший: Deprecated since 3.0, to be removed in 4.0.
Наследование: implements ArrayAccess, use trait Bolt\Storage\Entity\ContentRelationTrait, use trait Bolt\Storage\Entity\ContentRouteTrait, use trait Bolt\Storage\Entity\ContentSearchTrait, use trait Bolt\Storage\Entity\ContentTaxonomyTrait, use trait Bolt\Storage\Entity\ContentValuesTrait
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$config
$contenttype
$group
$id
$relation
$sortorder
$taxonomy
$user
$values

Защищенные свойства (Protected)

Свойство Тип Описание
$app Silex\Application

Открытые методы

Метод Описание
__call ( string $name, array $arguments ) : mixed Magic __call function, used for when templates use {{ content.title }}, so we can map it to $this->values['title'].
__construct ( Silex\Application $app, string $contenttype = '', array $values = [], boolean $isRootType = true )
fieldinfo ( string $key ) : array Get field information for the given field.
fieldtype ( string $key ) : string Get the fieldtype for a given fieldname.
getBaseColumns ( ) Gets a list of the base columns that are hard-coded into all content types (rather than configured through contenttypes.yml).
getDecodedValue ( string $name ) : mixed Get the decoded version of a value of the current object.
getTemplateContext ( )
next ( string $field = 'datepublish', array $where = [] ) : Content Get the next record. In this case 'next' is defined as 'first one published after this one' by default. You can pass a parameter like 'id' or '-title' to use that as the column to sort on.
offsetExists ( mixed $offset ) : boolean ArrayAccess support.
offsetGet ( mixed $offset ) : mixed ArrayAccess support.
offsetSet ( string $offset, mixed $value ) ArrayAccess support.
offsetUnset ( string $offset ) ArrayAccess support.
preParse ( string $snippet, boolean $allowtwig ) : string If passed snippet contains Twig tags, parse the string as Twig, and return the results.
previous ( string $field = 'datepublish', array $where = [] ) : Content Get the previous record. In this case 'previous' is defined as 'latest one published before this one' by default. You can pass a parameter like 'id' or '-title' to use that as the column to sort on.
setContenttype ( array | string $contenttype ) Set the Contenttype for the record.

Описание методов

__call() публичный Метод

Magic __call function, used for when templates use {{ content.title }}, so we can map it to $this->values['title'].
public __call ( string $name, array $arguments ) : mixed
$name string Method name originally called
$arguments array Arguments to the call
Результат mixed return value of the call

__construct() публичный Метод

public __construct ( Silex\Application $app, string $contenttype = '', array $values = [], boolean $isRootType = true )
$app Silex\Application
$contenttype string
$values array
$isRootType boolean

fieldinfo() публичный Метод

Get field information for the given field.
public fieldinfo ( string $key ) : array
$key string
Результат array An associative array containing at least the key 'type', and, depending on the type, other keys.

fieldtype() публичный Метод

Get the fieldtype for a given fieldname.
public fieldtype ( string $key ) : string
$key string
Результат string

getBaseColumns() публичный статический Метод

Gets a list of the base columns that are hard-coded into all content types (rather than configured through contenttypes.yml).
public static getBaseColumns ( )

getDecodedValue() публичный Метод

Get the decoded version of a value of the current object.
public getDecodedValue ( string $name ) : mixed
$name string name of the value to get
Результат mixed The decoded value or null when no value available

getTemplateContext() публичный Метод

public getTemplateContext ( )

next() публичный Метод

Get the next record. In this case 'next' is defined as 'first one published after this one' by default. You can pass a parameter like 'id' or '-title' to use that as the column to sort on.
public next ( string $field = 'datepublish', array $where = [] ) : Content
$field string
$where array
Результат Content

offsetExists() публичный Метод

ArrayAccess support.
public offsetExists ( mixed $offset ) : boolean
$offset mixed
Результат boolean

offsetGet() публичный Метод

ArrayAccess support.
public offsetGet ( mixed $offset ) : mixed
$offset mixed
Результат mixed

offsetSet() публичный Метод

ArrayAccess support.
public offsetSet ( string $offset, mixed $value )
$offset string
$value mixed

offsetUnset() публичный Метод

ArrayAccess support.
public offsetUnset ( string $offset )
$offset string

preParse() публичный Метод

If passed snippet contains Twig tags, parse the string as Twig, and return the results.
public preParse ( string $snippet, boolean $allowtwig ) : string
$snippet string
$allowtwig boolean
Результат string

previous() публичный Метод

Get the previous record. In this case 'previous' is defined as 'latest one published before this one' by default. You can pass a parameter like 'id' or '-title' to use that as the column to sort on.
public previous ( string $field = 'datepublish', array $where = [] ) : Content
$field string
$where array
Результат Content

setContenttype() публичный Метод

Set the Contenttype for the record.
public setContenttype ( array | string $contenttype )
$contenttype array | string

Описание свойств

$app защищенное свойство

protected Application,Silex $app
Результат Silex\Application

$config публичное свойство

public $config

$contenttype публичное свойство

public $contenttype

$group публичное свойство

public $group

$id публичное свойство

public $id

$relation публичное свойство

public $relation

$sortorder публичное свойство

public $sortorder

$taxonomy публичное свойство

public $taxonomy

$user публичное свойство

public $user

$values публичное свойство

public $values