abstract class Tag extends AbstractModel implements TagInterface (View source)

Properties

protected AbstractDao $dao from AbstractModel
protected array $options Options of the current tag, can contain some configurations for the editmode, or the thumbnail name, .
protected string $name
protected string $realName Contains the real name of the editable without the prefixes and suffixes which are generated automatically by blocks and areablocks
protected int $documentId Element belongs to the ID of the document
protected Action $controller
protected ViewModelInterface|View $view
protected bool $editmode In Editmode or not
protected bool $inherited

Methods

Dao
getDao()

No description

setDao($dao)

No description

getResource() deprecated

No description

initDao(null $key = null, bool $forceDetection = false)

No description

static string|null
locateDaoClass(string $modelClass)

No description

$this
setValues(array $data = [])

No description

$this
setValue($key, $value)

No description

array
__sleep()

Returns only the properties which should be serialized

mixed
__call($method, $args)

No description

__clone()

No description

array
getObjectVars()

returns object values without the dao

array
__debugInfo()

No description

void
beginTransaction()

No description

void
commit()

No description

void
rollBack()

No description

void
configure()

No description

array
getValidTableColumns(string $table, bool $cache)

No description

void
resetValidTableColumnsCache(string $table)

No description

static mixed
factory($type, $name, $documentId, null $config = null, null $controller = null, null $view = null, null $editmode = null)

No description

string
admin()

No description

array
getEditmodeOptions()

Builds options passed to editmode frontend as JSON config

mixed
getEditmodeData()

Builds data used for editmode

array
getEditmodeElementAttributes(array $options)

Builds attributes used on the editmode HTML element

array
getEditmodeElementClasses()

Builds classes used on the editmode HTML element

outputEditmode(string $value)

Sends data to the output stream

string
outputEditmodeOptions(array $options, bool $return = false)

Push editmode options into the JS config array

mixed
getValue()

No description

string
getName()

No description

$this
setName(string $name)

No description

$this
setDocumentId(int $id)

No description

int
getDocumentId()

No description

array
getOptions()

No description

$this
setOptions(array $options)

No description

$this
setController(Action $controller)

No description

Action
getController()

No description

$this
setView(ViewModelInterface|View $view)

No description

getView()

No description

string
getRealName()

No description

setRealName(string $realName)

No description

setParentBlockNames(array $parentNames)

No description

getParentBlockNames()

No description

string
__toString()

direct output to the frontend

bool
getEditmode()

No description

$this
setEditmode(bool $editmode)

No description

$this
getDataForResource()

No description

array
getCacheTags($ownerDocument, array $tags = [])

No description

resolveDependencies()

This is a dummy and is mostly implemented by relation types

getFromWebserviceImport($wsElement, $document = null, $params = [], $idMapper = null)

Receives a standard class object from webservice import and fills the current tag's data

array
getForWebserviceExport($document = null, mixed $params = [])

Returns the current tag's data for web service export

bool
checkValidity()

No description

$this
setInherited($inherited)

No description

bool
getInherited()

No description

getBlockState()

TODO inject block state via DI

static string
buildTagName(string $type, string $name, Document $document = null)

Builds a tag name for an editable, taking current block state (block, index) and targeting into account.

static 
buildTagRealName(string $name, Document $document)

No description

Details

Dao getDao()

Return Value

Dao

AbstractModel setDao($dao)

Parameters

$dao

Return Value

AbstractModel

AbstractDao getResource() deprecated

deprecated

Return Value

AbstractDao

initDao(null $key = null, bool $forceDetection = false)

Parameters

null $key
bool $forceDetection

Exceptions

Exception

static string|null locateDaoClass(string $modelClass)

Parameters

string $modelClass

Return Value

string|null

$this setValues(array $data = [])

Parameters

array $data

Return Value

$this

$this setValue($key, $value)

Parameters

$key
$value

Return Value

$this

array __sleep()

Returns only the properties which should be serialized

Return Value

array

mixed __call($method, $args)

Parameters

$method
$args

Return Value

mixed

Exceptions

Exception

__clone()

array getObjectVars()

returns object values without the dao

Return Value

array

array __debugInfo()

Return Value

array

void beginTransaction()

Return Value

void

void commit()

Return Value

void

void rollBack()

Return Value

void

void configure()

Return Value

void

array getValidTableColumns(string $table, bool $cache)

Parameters

string $table
bool $cache

Return Value

array

void resetValidTableColumnsCache(string $table)

Parameters

string $table

Return Value

void

static mixed factory($type, $name, $documentId, null $config = null, null $controller = null, null $view = null, null $editmode = null)

Parameters

$type
$name
$documentId
null $config
null $controller
null $view
null $editmode

Return Value

mixed

string admin()

Return Value

string

protected array getEditmodeOptions()

Builds options passed to editmode frontend as JSON config

Return Value

array

protected mixed getEditmodeData()

Builds data used for editmode

Return Value

mixed

protected array getEditmodeElementAttributes(array $options)

Builds attributes used on the editmode HTML element

Parameters

array $options

Return Value

array

protected getEditmodeBlockStateAttributes()

protected array getEditmodeElementClasses()

Builds classes used on the editmode HTML element

Return Value

array

protected outputEditmode(string $value)

Sends data to the output stream

Parameters

string $value

protected string outputEditmodeOptions(array $options, bool $return = false)

Push editmode options into the JS config array

Parameters

array $options
bool $return

Return Value

string

mixed getValue()

Return Value

mixed

string getName()

Return Value

string

$this setName(string $name)

Parameters

string $name

Return Value

$this

$this setDocumentId(int $id)

Parameters

int $id

Return Value

$this

int getDocumentId()

Return Value

int

array getOptions()

Return Value

array

$this setOptions(array $options)

Parameters

array $options

Return Value

$this

$this setController(Action $controller)

Parameters

Action $controller

Return Value

$this

Action getController()

Return Value

Action

$this setView(ViewModelInterface|View $view)

Parameters

ViewModelInterface|View $view

Return Value

$this

ViewModelInterface|View getView()

Return Value

ViewModelInterface|View

string getRealName()

Return Value

string

setRealName(string $realName)

Parameters

string $realName

final setParentBlockNames(array $parentNames)

Parameters

array $parentNames

final getParentBlockNames()

string __toString()

direct output to the frontend

Return Value

string

bool getEditmode()

Return Value

bool

$this setEditmode(bool $editmode)

Parameters

bool $editmode

Return Value

$this

$this getDataForResource()

Return Value

$this

array getCacheTags($ownerDocument, array $tags = [])

Parameters

$ownerDocument
array $tags

Return Value

array

resolveDependencies()

This is a dummy and is mostly implemented by relation types

Element getFromWebserviceImport($wsElement, $document = null, $params = [], $idMapper = null)

Receives a standard class object from webservice import and fills the current tag's data

Parameters

$wsElement
$document
$params
$idMapper

Return Value

Element

array getForWebserviceExport($document = null, mixed $params = [])

Returns the current tag's data for web service export

Parameters

$document
mixed $params

Return Value

array

bool checkValidity()

Return Value

bool

$this setInherited($inherited)

Parameters

$inherited

Return Value

$this

bool getInherited()

Return Value

bool

protected BlockState getBlockState()

TODO inject block state via DI

Return Value

BlockState

static string buildTagName(string $type, string $name, Document $document = null)

Builds a tag name for an editable, taking current block state (block, index) and targeting into account.

Parameters

string $type
string $name
Document $document

Return Value

string

Exceptions

Exception

static buildTagRealName(string $name, Document $document)

Parameters

string $name
Document $document