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
파일 보기 프로젝트 열기: bolt/bolt 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$config
$contenttype
$group
$id
$relation
$sortorder
$taxonomy
$user
$values

보호된 프로퍼티들

프로퍼티 타입 설명
$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