Documentation

Block extends WidgetParseTarget
in package

Cx\Modules\Block\Model\Entity\Block

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Manuel Schenk manuel.schenk@comvation.com

version
1.0.0
subpackage

module_block

Table of Contents

Properties

$active  : int
$category  : Category
$content  : array<string|int, mixed>
Block content per language
$end  : int
$id  : int
Block ID
$localeCodes  : array<string|int, mixed>
List of locale codes ordered by translation fallback order per Cx instance
$name  : string
$nestingCount  : int
Counts the nesting level of __call()
$order  : int
$random  : int
$random2  : int
$random3  : int
$random4  : int
$relLangContents  : Collection
$relPages  : Collection
$showInCategory  : int
$showInDirect  : int
$showInGlobal  : int
$start  : int
$stringRepresentationBlank  : bool
Whether blank string representations are valid
$stringRepresentationFields  : array<string|int, mixed>
List of fields that should be available in the string representation
$stringRepresentationFormat  : string
Sprintf format for the string representation
$targetingOptions  : Collection
$validators  : array<string|int, mixed>
Initialize this array as follows: array( 'columName' => Zend_Validate )
$versionRelLangContent  : string
$versionRelPageCategory  : string
$versionRelPageDirect  : string
$versionRelPageGlobal  : string
$versionTargetingOption  : string
$virtual  : bool
Defines if an entity is virtual and therefore not persistable.
$wysiwygEditor  : int

Methods

__call()  : mixed
Route methods like getName(), getType(), getDirectory(), etc.
__construct()  : mixed
Creates a new block entity used for WidgetParseTarget
__get()  : mixed
This is an ugly solution to allow $this->cx to be available in all entity classes Since the entity's constructor is not called when an entity is loaded from DB this cannot be assigned there.
__toString()  : string
Returns this entity's identifying value
addRelLangContent()  : mixed
Add relLangContent
addRelPage()  : mixed
Add relPage
addTargetingOption()  : mixed
Add targetingOption
getActive()  : int
Get active
getCategory()  : Category
Get category
getComponentController()  : SystemComponent
Returns the component controller for this component
getContent()  : string
Returns this block's content. Required WidgetParseTarget getter
getEnd()  : int
Get end
getId()  : int
Returns this block's ID
getKeyAsString()  : string
Returns this entity's key
getName()  : string
Get name
getOrder()  : int
Get order
getRandom()  : int
Get random
getRandom2()  : int
Get random2
getRandom3()  : int
Get random3
getRandom4()  : int
Get random4
getRelLangContents()  : Collection
Get relLangContents
getRelPages()  : Collection
Get relPages
getShowInCategory()  : int
Get showInCategory
getShowInDirect()  : int
Get showInDirect
getShowInGlobal()  : int
Get showInGlobal
getStart()  : int
Get start
getTargetingOptions()  : Collection
Get targetingOptions
getTranslatedFieldValue()  : mixed
Returns the value of a translatable field using fallback mechanisms
getVersionRelLangContent()  : string
Get versionRelLangContent
getVersionRelPageCategory()  : string
Get versionRelPageCategory
getVersionRelPageDirect()  : string
Get versionRelPageDirect
getVersionRelPageGlobal()  : string
Get versionRelPageGlobal
getVersionTargetingOption()  : string
Get versionTargetingOption
getWidgetContent()  : Sigma
Returns the content for a widget
getWidgetContentAttributeName()  : string
Returns the name of the attribute which contains content that may contain a widget
getWysiwygEditor()  : int
Get wysiwygEditor
initializeValidators()  : mixed
Set $this->validators
isVirtual()  : bool
Returns the virtuality of the entity
setActive()  : mixed
Set active
setCategory()  : mixed
Set category
setEnd()  : mixed
Set end
setId()  : mixed
Set id
setName()  : mixed
Set name
setOrder()  : mixed
Set order
setRandom()  : mixed
Set random
setRandom2()  : mixed
Set random2
setRandom3()  : mixed
Set random3
setRandom4()  : mixed
Set random4
setRelLangContents()  : mixed
Set relLangContents
setRelPages()  : mixed
Set relPages
setShowInCategory()  : mixed
Set showInCategory
setShowInDirect()  : mixed
Set showInDirect
setShowInGlobal()  : mixed
Set showInGlobal
setStart()  : mixed
Set start
setTargetingOptions()  : mixed
Set targetingOptions
setVersionRelLangContent()  : mixed
Set versionRelLangContent
setVersionRelPageCategory()  : mixed
Set versionRelPageCategory
setVersionRelPageDirect()  : mixed
Set versionRelPageDirect
setVersionRelPageGlobal()  : mixed
Set versionRelPageGlobal
setVersionTargetingOption()  : mixed
Set versionTargetingOption
setVirtual()  : mixed
Set the virtuality of the entity
setWysiwygEditor()  : mixed
Set wysiwygEditor
validate()  : mixed
getContentTemplateForWidget()  : Sigma
Returns the template in which the widget can be used
getFallbackLocaleCodes()  : array<string|int, mixed>
Returns a list of all locale codes ordered by fallback order
getStringRepresentationBlank()  : bool
Whether blank string representations are valid
getStringRepresentationFields()  : array<string|int, mixed>
Returns a list of fields available in the string representation
getStringRepresentationFormat()  : string
Returns the sprintf() format for the string representation

Properties

$content

Block content per language

protected array<string|int, mixed> $content

$localeCodes

List of locale codes ordered by translation fallback order per Cx instance

protected static array<string|int, mixed> $localeCodes = array()

Array in the form: array(<instanceId> => array(<localeCode>, ...))

Tags
see
getFallbackLocaleCodes()

$nestingCount

Counts the nesting level of __call()

protected static int $nestingCount = 0

$relLangContents

protected Collection $relLangContents

$stringRepresentationBlank

Whether blank string representations are valid

protected bool $stringRepresentationBlank = false

Whether blank string representations are valid

Tags
see
getStringRepresentationBlank()

$stringRepresentationFields

List of fields that should be available in the string representation

protected array<string|int, mixed> $stringRepresentationFields = array()

List of field names

Tags
see
getStringRepresentationFields()

$stringRepresentationFormat

Sprintf format for the string representation

protected string $stringRepresentationFormat = ''

Sprintf format string

Tags
see
getStringRepresentationFormat()

$targetingOptions

protected Collection $targetingOptions

$validators

Initialize this array as follows: array( 'columName' => Zend_Validate )

protected array<string|int, mixed> $validators = array()

$versionRelLangContent

protected string $versionRelLangContent

$versionRelPageCategory

protected string $versionRelPageCategory

$versionRelPageDirect

protected string $versionRelPageDirect

$versionRelPageGlobal

protected string $versionRelPageGlobal

$versionTargetingOption

protected string $versionTargetingOption

$virtual

Defines if an entity is virtual and therefore not persistable.

protected bool $virtual = false

Defaults to FALSE - not virtual.

Methods

__call()

Route methods like getName(), getType(), getDirectory(), etc.

public __call(string $methodName, array<string|int, mixed> $arguments) : mixed
Parameters
$methodName : string

Name of method to call

$arguments : array<string|int, mixed>

List of arguments for the method to call

Tags
throws
Exception

If __call() nesting level reaches 20

Attributes
#[ReturnTypeWillChange]
Return values
mixed

Return value of the method to call

__construct()

Creates a new block entity used for WidgetParseTarget

public __construct([int $blockId = 0 ]) : mixed
Parameters
$blockId : int = 0

Block ID

__get()

This is an ugly solution to allow $this->cx to be available in all entity classes Since the entity's constructor is not called when an entity is loaded from DB this cannot be assigned there.

public __get(mixed $name) : mixed
Parameters
$name : mixed
Attributes
#[ReturnTypeWillChange]

__toString()

Returns this entity's identifying value

public __toString() : string

By default this returns the same as getKeyAsString(), but this method might get overridden by subclasses.

Return values
string

Identifying value for this entity

addRelLangContent()

Add relLangContent

public addRelLangContent(RelLangContent $relLangContent) : mixed
Parameters
$relLangContent : RelLangContent

addRelPage()

Add relPage

public addRelPage(RelPage $relPage) : mixed
Parameters
$relPage : RelPage

addTargetingOption()

Add targetingOption

public addTargetingOption(TargetingOption $targetingOption) : mixed
Parameters
$targetingOption : TargetingOption

getActive()

Get active

public getActive() : int
Return values
int

$active

getCategory()

Get category

public getCategory() : Category
Return values
Category

$category

getContent()

Returns this block's content. Required WidgetParseTarget getter

public getContent(int $langId) : string
Parameters
$langId : int

Internal language/locale ID

Return values
string

Block content

getEnd()

Get end

public getEnd() : int
Return values
int

$end

getId()

Returns this block's ID

public getId() : int
Return values
int

Block ID

getKeyAsString()

Returns this entity's key

public final getKeyAsString([string $separator = '/' ]) : string

If this entity has a composite key, the fields are separated by $separator.

Parameters
$separator : string = '/'

(optional) Separator for composite key fields, default "/"

Return values
string

Entity key as string

getName()

Get name

public getName() : string
Return values
string

$name

getOrder()

Get order

public getOrder() : int
Return values
int

$order

getRandom()

Get random

public getRandom() : int
Return values
int

$random

getRandom2()

Get random2

public getRandom2() : int
Return values
int

$random2

getRandom3()

Get random3

public getRandom3() : int
Return values
int

$random3

getRandom4()

Get random4

public getRandom4() : int
Return values
int

$random4

getRelLangContents()

Get relLangContents

public getRelLangContents() : Collection
Return values
Collection

$relLangContents

getRelPages()

Get relPages

public getRelPages() : Collection
Return values
Collection

$relPages

getShowInCategory()

Get showInCategory

public getShowInCategory() : int
Return values
int

$showInCategory

getShowInDirect()

Get showInDirect

public getShowInDirect() : int
Return values
int

$showInDirect

getShowInGlobal()

Get showInGlobal

public getShowInGlobal() : int
Return values
int

$showInGlobal

getStart()

Get start

public getStart() : int
Return values
int

$start

getTargetingOptions()

Get targetingOptions

public getTargetingOptions() : Collection
Return values
Collection

$targetingOptions

getTranslatedFieldValue()

Returns the value of a translatable field using fallback mechanisms

public getTranslatedFieldValue(string $fieldName) : mixed

If the field is not translatable its value is returned anyway. Tries to return the value in the following locales (if non-empty):

  • Current locale
  • Default locale
  • All other locales
Parameters
$fieldName : string

Name of a translatable field

getVersionRelLangContent()

Get versionRelLangContent

public getVersionRelLangContent() : string
Return values
string

$versionRelLangContent

getVersionRelPageCategory()

Get versionRelPageCategory

public getVersionRelPageCategory() : string
Return values
string

$versionRelPageCategory

getVersionRelPageDirect()

Get versionRelPageDirect

public getVersionRelPageDirect() : string
Return values
string

$versionRelPageDirect

getVersionRelPageGlobal()

Get versionRelPageGlobal

public getVersionRelPageGlobal() : string
Return values
string

$versionRelPageGlobal

getVersionTargetingOption()

Get versionTargetingOption

public getVersionTargetingOption() : string
Return values
string

$versionTargetingOption

getWidgetContent()

Returns the content for a widget

public getWidgetContent(string $widgetName, Theme $theme, Page $page, mixed $channel) : Sigma
Parameters
$widgetName : string
$theme : Theme

Theme which is parsed

$page : Page

Page which is parsed

$channel : mixed
Return values
Sigma

Widget content

getWidgetContentAttributeName()

Returns the name of the attribute which contains content that may contain a widget

public getWidgetContentAttributeName(string $widgetName) : string
Parameters
$widgetName : string
Return values
string

Attribute name

getWysiwygEditor()

Get wysiwygEditor

public getWysiwygEditor() : int
Return values
int

$wysiwygEditor

initializeValidators()

Set $this->validators

public initializeValidators() : mixed

Validators can be found in lib/FRAMEWORK/Validator.class.php These will be executed if validate() is called

isVirtual()

Returns the virtuality of the entity

public isVirtual() : bool
Return values
bool

TRUE if the entity is virtual, otherwise FALSE

setActive()

Set active

public setActive(int $active) : mixed
Parameters
$active : int

setCategory()

Set category

public setCategory(Category $category) : mixed
Parameters
$category : Category

setEnd()

Set end

public setEnd(int $end) : mixed
Parameters
$end : int

setId()

Set id

public setId(int $id) : mixed
Parameters
$id : int

setName()

Set name

public setName(string $name) : mixed
Parameters
$name : string

setOrder()

Set order

public setOrder(int $order) : mixed
Parameters
$order : int

setRandom()

Set random

public setRandom(int $random) : mixed
Parameters
$random : int

setRandom2()

Set random2

public setRandom2(int $random2) : mixed
Parameters
$random2 : int

setRandom3()

Set random3

public setRandom3(int $random3) : mixed
Parameters
$random3 : int

setRandom4()

Set random4

public setRandom4(int $random4) : mixed
Parameters
$random4 : int

setRelLangContents()

Set relLangContents

public setRelLangContents(Collection $relLangContents) : mixed
Parameters
$relLangContents : Collection

setRelPages()

Set relPages

public setRelPages(Collection $relPages) : mixed
Parameters
$relPages : Collection

setShowInCategory()

Set showInCategory

public setShowInCategory(int $showInCategory) : mixed
Parameters
$showInCategory : int

setShowInDirect()

Set showInDirect

public setShowInDirect(int $showInDirect) : mixed
Parameters
$showInDirect : int

setShowInGlobal()

Set showInGlobal

public setShowInGlobal(int $showInGlobal) : mixed
Parameters
$showInGlobal : int

setStart()

Set start

public setStart(int $start) : mixed
Parameters
$start : int

setTargetingOptions()

Set targetingOptions

public setTargetingOptions(Collection $targetingOptions) : mixed
Parameters
$targetingOptions : Collection

setVersionRelLangContent()

Set versionRelLangContent

public setVersionRelLangContent(string $versionRelLangContent) : mixed
Parameters
$versionRelLangContent : string

setVersionRelPageCategory()

Set versionRelPageCategory

public setVersionRelPageCategory(string $versionRelPageCategory) : mixed
Parameters
$versionRelPageCategory : string

setVersionRelPageDirect()

Set versionRelPageDirect

public setVersionRelPageDirect(string $versionRelPageDirect) : mixed
Parameters
$versionRelPageDirect : string

setVersionRelPageGlobal()

Set versionRelPageGlobal

public setVersionRelPageGlobal(string $versionRelPageGlobal) : mixed
Parameters
$versionRelPageGlobal : string

setVersionTargetingOption()

Set versionTargetingOption

public setVersionTargetingOption(string $versionTargetingOption) : mixed
Parameters
$versionTargetingOption : string

setVirtual()

Set the virtuality of the entity

public setVirtual(bool $virtual) : mixed
Parameters
$virtual : bool

TRUE to set the entity as virtual or otherwise to FALSE

setWysiwygEditor()

Set wysiwygEditor

public setWysiwygEditor(int $wysiwygEditor) : mixed
Parameters
$wysiwygEditor : int

getContentTemplateForWidget()

Returns the template in which the widget can be used

protected getContentTemplateForWidget(string $widgetName, int $langId, Page $page, string $channel) : Sigma
Parameters
$widgetName : string

Name of the Widget to get template for

$langId : int

Language ID

$page : Page

Current page

$channel : string

Current channel

Return values
Sigma

Template which may contain the widget

getFallbackLocaleCodes()

Returns a list of all locale codes ordered by fallback order

protected getFallbackLocaleCodes() : array<string|int, mixed>
  • First entry is the current locale
  • Second entry is the default locale (if different from current, it's omitted otherwise)
  • Then all other locales follow (in no particular order)
Tags
todo

Order the array by the fallback order (same as in ContentManager)

Return values
array<string|int, mixed>

List of locale codes

getStringRepresentationBlank()

Whether blank string representations are valid

protected getStringRepresentationBlank() : bool
Return values
bool

Whether blank string representations are valid

getStringRepresentationFields()

Returns a list of fields available in the string representation

protected getStringRepresentationFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

List of field names

getStringRepresentationFormat()

Returns the sprintf() format for the string representation

protected getStringRepresentationFormat() : string
Return values
string

sprintf() format string


        
On this page

Search results