PHP Class Newscoop\Entity\Snippet\SnippetTemplate

Show file Open project: sourcefabric/newscoop Class Usage Examples

Protected Properties

Property Type Description
$controller string
$created string
$enabled boolean
$favourite boolean
$fields Doctrine\Common\Collections\ArrayCollection
$iconActive base64 encoded image
$iconInactive base64 encoded image
$id integer
$modified string
$name string
$snippets Doctrine\Common\Collections\ArrayCollection
$templateCode text

Public Methods

Method Description
__construct ( ) Constructs the SnippetTemplate
__toString ( ) : string Returns SnippetTemplate name
addField ( SnippetTemplateField $field ) : Newscoop\Entity\Snippet\SnippetTemplate Add Snippet Template Field
createField ( array $parameters ) : Newscoop\Entity\Snippet\SnippetTemplate Create and add Snippet Template Field
executeController ( Snippet $snippet, $update = false )
getController ( ) : string Getter for Controller
getCreated ( ) : DateTime Getter for created
getEnabled ( ) : mixed Getter for enabled
getFavourite ( ) : boolean Getter for favourite
getFields ( ) : mixed Getter for field
getIconActive ( ) : text Getter for iconActive
getIconInactive ( ) : text Getter for iconInactive
getId ( ) : integer Getter for id
getModified ( ) : mixed Getter for modified
getName ( ) : string Getter for name
getSnippets ( ) : ArrayCollection Get Snippets using the selected Template
getTemplateCode ( ) : string Getter for template
hasController ( )
hasFields ( ) : mixed Check if the Template has Fields
hasName ( )
hasTemplateCode ( )
setController ( string $controller ) : Newscoop\Entity\Snippet\SnippetTemplate Setter for controller
setCreated ( DateTime $created = null ) : Snippet Setter for created
setEnabled ( mixed $enabled ) : self Setter for enabled
setFavourite ( boolean $favourite ) : Newscoop\Entity\Snippet\SnippetTemplate Setter for favourite
setIconActive ( string $iconActive ) : Newscoop\Entity\Snippet\SnippetTemplate Setter for iconActive
setIconInactive ( string $iconInactive ) : Newscoop\Entity\Snippet\SnippetTemplate Setter for iconInactive
setId ( integer $id ) : Newscoop\Entity\Snippet\SnippetTemplate Setter for id
setModified ( mixed $modified = null ) : self Setter for modified
setName ( string $name ) : Newscoop\Entity\Snippet\SnippetTemplate Setter for name
setTemplateCode ( string $templateCode ) : Newscoop\Entity\Snippet\SnippetTemplate Setter for template code

Method Details

__construct() public method

Constructs the SnippetTemplate
public __construct ( )

__toString() public method

Returns SnippetTemplate name
public __toString ( ) : string
return string name

addField() public method

Add Snippet Template Field
public addField ( SnippetTemplateField $field ) : Newscoop\Entity\Snippet\SnippetTemplate
$field Newscoop\Entity\Snippet\SnippetTemplate\SnippetTemplateField Field to add
return Newscoop\Entity\Snippet\SnippetTemplate

createField() public method

Create and add Snippet Template Field
public createField ( array $parameters ) : Newscoop\Entity\Snippet\SnippetTemplate
$parameters array Array with Parameters
return Newscoop\Entity\Snippet\SnippetTemplate

executeController() public method

public executeController ( Snippet $snippet, $update = false )
$snippet Newscoop\Entity\Snippet

getController() public method

Getter for Controller
public getController ( ) : string
return string

getCreated() public method

Getter for created
public getCreated ( ) : DateTime
return DateTime

getEnabled() public method

Getter for enabled
public getEnabled ( ) : mixed
return mixed

getFavourite() public method

Getter for favourite
public getFavourite ( ) : boolean
return boolean

getFields() public method

Getter for field
public getFields ( ) : mixed
return mixed

getIconActive() public method

Getter for iconActive
public getIconActive ( ) : text
return text base64 encoded image

getIconInactive() public method

Getter for iconInactive
public getIconInactive ( ) : text
return text base64 encoded image

getId() public method

Getter for id
public getId ( ) : integer
return integer

getModified() public method

Getter for modified
public getModified ( ) : mixed
return mixed

getName() public method

Getter for name
public getName ( ) : string
return string

getSnippets() public method

Get Snippets using the selected Template
public getSnippets ( ) : ArrayCollection
return Doctrine\Common\Collections\ArrayCollection

getTemplateCode() public method

Getter for template
public getTemplateCode ( ) : string
return string JSON

hasController() public method

public hasController ( )

hasFields() public method

Check if the Template has Fields
public hasFields ( ) : mixed
return mixed

hasName() public method

public hasName ( )

hasTemplateCode() public method

public hasTemplateCode ( )

setController() public method

Setter for controller
public setController ( string $controller ) : Newscoop\Entity\Snippet\SnippetTemplate
$controller string Value to set
return Newscoop\Entity\Snippet\SnippetTemplate

setCreated() public method

Setter for created
public setCreated ( DateTime $created = null ) : Snippet
$created DateTime Value to set
return Newscoop\Entity\Snippet

setEnabled() public method

Setter for enabled
public setEnabled ( mixed $enabled ) : self
$enabled mixed Value to set
return self

setFavourite() public method

Setter for favourite
public setFavourite ( boolean $favourite ) : Newscoop\Entity\Snippet\SnippetTemplate
$favourite boolean
return Newscoop\Entity\Snippet\SnippetTemplate

setIconActive() public method

Setter for iconActive
public setIconActive ( string $iconActive ) : Newscoop\Entity\Snippet\SnippetTemplate
$iconActive string base64 encoded image $iconInactive
return Newscoop\Entity\Snippet\SnippetTemplate

setIconInactive() public method

Setter for iconInactive
public setIconInactive ( string $iconInactive ) : Newscoop\Entity\Snippet\SnippetTemplate
$iconInactive string base64 encoded image
return Newscoop\Entity\Snippet\SnippetTemplate

setId() public method

Setter for id
public setId ( integer $id ) : Newscoop\Entity\Snippet\SnippetTemplate
$id integer
return Newscoop\Entity\Snippet\SnippetTemplate

setModified() public method

Setter for modified
public setModified ( mixed $modified = null ) : self
$modified mixed Value to set
return self

setName() public method

Setter for name
public setName ( string $name ) : Newscoop\Entity\Snippet\SnippetTemplate
$name string
return Newscoop\Entity\Snippet\SnippetTemplate

setTemplateCode() public method

Setter for template code
public setTemplateCode ( string $templateCode ) : Newscoop\Entity\Snippet\SnippetTemplate
$templateCode string Template Code to Set (Twig format)
return Newscoop\Entity\Snippet\SnippetTemplate

Property Details

$controller protected property

protected string $controller
return string

$created protected property

protected string $created
return string

$enabled protected property

protected bool $enabled
return boolean

$favourite protected property

protected bool $favourite
return boolean

$fields protected property

protected ArrayCollection,Doctrine\Common\Collections $fields
return Doctrine\Common\Collections\ArrayCollection

$iconActive protected property

base64 encoded image
protected $iconActive

$iconInactive protected property

base64 encoded image
protected $iconInactive

$id protected property

protected int $id
return integer

$modified protected property

protected string $modified
return string

$name protected property

protected string $name
return string

$snippets protected property

protected ArrayCollection,Doctrine\Common\Collections $snippets
return Doctrine\Common\Collections\ArrayCollection

$templateCode protected property

protected text $templateCode
return text