PHP Class Bolt\Storage\Entity\Content

Inheritance: extends Bolt\Storage\Entity\Entity, use trait ContentRouteTrait, use trait Bolt\Storage\Mapping\ContentTypeTitleTrait
Afficher le fichier Open project: bolt/bolt Class Usage Examples

Protected Properties

Свойство Type Description
$_legacy Bolt\Storage\ContentLegacyService
$contenttype
$datechanged DateTime
$datecreated DateTime
$datedepublish DateTime
$datepublish DateTime
$group array @deprecated Deprecated since 3.0, to be removed in 4.0.
$id integer
$ownerid integer
$relation Bolt\Storage\Collection\Relations
$slug string
$sortorder integer
$status string
$taxonomy Bolt\Storage\Collection\Taxonomy

Méthodes publiques

Méthode Description
get ( string $key ) : mixed Getter for templates using {{ content.get(title) }} functions.
getContenttype ( )
getDatechanged ( ) : DateTime Get change date.
getDatecreated ( ) : DateTime Get creation date.
getDatedepublish ( ) : DateTime
getDatepublish ( ) : DateTime
getGroup ( ) : array
getId ( ) : integer
getLegacy ( ) : Bolt\Storage\ContentLegacyService
getOwnerid ( ) : integer
getRelation ( string | null $contentType = null ) : Relations
getSlug ( ) : string
getSortorder ( ) : integer
getStatus ( ) : string
getTaxonomy ( ) : Taxonomy
getTemplatefields ( )
getTitle ( ) : string Getter for a record's 'title' field.
set ( string $key, mixed $value ) Setter for content values.
setContenttype ( $value )
setDatechanged ( DateTime | string | null $date ) Set change date.
setDatecreated ( DateTime | string | null $date ) Set creation date.
setDatedepublish ( DateTime | string | null $date ) Set depublished date.
setDatepublish ( DateTime | string | null $date ) Set published date.
setGroup ( array $group )
setId ( integer $id )
setLegacyService ( Bolt\Storage\ContentLegacyService $service )
setOwnerid ( integer $ownerid )
setRelation ( Relations $rel )
setSlug ( string $slug )
setSortorder ( integer $sortorder )
setStatus ( string $status )
setTaxonomy ( Taxonomy $taxonomy )
setTemplatefields ( $value )
setValues ( array $values ) Helper to set an array of values

Méthodes protégées

Méthode Description
getValidDateObject ( DateTime | string | null $date ) : DateTime | null Get a valid date property to persist.

Method Details

get() public méthode

Getter for templates using {{ content.get(title) }} functions.
public get ( string $key ) : mixed
$key string
Résultat mixed

getContenttype() public méthode

public getContenttype ( )

getDatechanged() public méthode

Get change date.
public getDatechanged ( ) : DateTime
Résultat DateTime

getDatecreated() public méthode

Get creation date.
public getDatecreated ( ) : DateTime
Résultat DateTime

getDatedepublish() public méthode

public getDatedepublish ( ) : DateTime
Résultat DateTime

getDatepublish() public méthode

public getDatepublish ( ) : DateTime
Résultat DateTime

getGroup() public méthode

public getGroup ( ) : array
Résultat array

getId() public méthode

public getId ( ) : integer
Résultat integer

getLegacy() public méthode

public getLegacy ( ) : Bolt\Storage\ContentLegacyService
Résultat Bolt\Storage\ContentLegacyService

getOwnerid() public méthode

public getOwnerid ( ) : integer
Résultat integer

getRelation() public méthode

public getRelation ( string | null $contentType = null ) : Relations
$contentType string | null
Résultat Bolt\Storage\Collection\Relations

getSlug() public méthode

public getSlug ( ) : string
Résultat string

getSortorder() public méthode

public getSortorder ( ) : integer
Résultat integer

getStatus() public méthode

public getStatus ( ) : string
Résultat string

getTaxonomy() public méthode

public getTaxonomy ( ) : Taxonomy
Résultat Bolt\Storage\Collection\Taxonomy

getTemplatefields() public méthode

public getTemplatefields ( )

getTitle() public méthode

If there is no field called 'title' then we just return the first text type field.
public getTitle ( ) : string
Résultat string

getValidDateObject() protected méthode

Get a valid date property to persist.
protected getValidDateObject ( DateTime | string | null $date ) : DateTime | null
$date DateTime | string | null
Résultat DateTime | null

set() public méthode

Setter for content values.
public set ( string $key, mixed $value )
$key string
$value mixed

setContenttype() public méthode

public setContenttype ( $value )

setDatechanged() public méthode

Set change date.
public setDatechanged ( DateTime | string | null $date )
$date DateTime | string | null

setDatecreated() public méthode

Set creation date.
public setDatecreated ( DateTime | string | null $date )
$date DateTime | string | null

setDatedepublish() public méthode

Set depublished date.
public setDatedepublish ( DateTime | string | null $date )
$date DateTime | string | null

setDatepublish() public méthode

Set published date.
public setDatepublish ( DateTime | string | null $date )
$date DateTime | string | null

setGroup() public méthode

public setGroup ( array $group )
$group array

setId() public méthode

public setId ( integer $id )
$id integer

setLegacyService() public méthode

public setLegacyService ( Bolt\Storage\ContentLegacyService $service )
$service Bolt\Storage\ContentLegacyService

setOwnerid() public méthode

public setOwnerid ( integer $ownerid )
$ownerid integer

setRelation() public méthode

public setRelation ( Relations $rel )
$rel Bolt\Storage\Collection\Relations

setSlug() public méthode

public setSlug ( string $slug )
$slug string

setSortorder() public méthode

public setSortorder ( integer $sortorder )
$sortorder integer

setStatus() public méthode

public setStatus ( string $status )
$status string

setTaxonomy() public méthode

public setTaxonomy ( Taxonomy $taxonomy )
$taxonomy Bolt\Storage\Collection\Taxonomy

setTemplatefields() public méthode

public setTemplatefields ( $value )

setValues() public méthode

Helper to set an array of values
public setValues ( array $values )
$values array

Property Details

$_legacy protected_oe property

protected ContentLegacyService,Bolt\Storage $_legacy
Résultat Bolt\Storage\ContentLegacyService

$contenttype protected_oe property

protected $contenttype

$datechanged protected_oe property

protected DateTime $datechanged
Résultat DateTime

$datecreated protected_oe property

protected DateTime $datecreated
Résultat DateTime

$datedepublish protected_oe property

protected DateTime $datedepublish
Résultat DateTime

$datepublish protected_oe property

protected DateTime $datepublish
Résultat DateTime

$group protected_oe property

@deprecated Deprecated since 3.0, to be removed in 4.0.
protected array $group
Résultat array

$id protected_oe property

protected int $id
Résultat integer

$ownerid protected_oe property

protected int $ownerid
Résultat integer

$relation protected_oe property

protected Relations,Bolt\Storage\Collection $relation
Résultat Bolt\Storage\Collection\Relations

$slug protected_oe property

protected string $slug
Résultat string

$sortorder protected_oe property

protected int $sortorder
Résultat integer

$status protected_oe property

protected string $status
Résultat string

$taxonomy protected_oe property

protected Taxonomy,Bolt\Storage\Collection $taxonomy
Résultat Bolt\Storage\Collection\Taxonomy