class Controller extends AbstractController implements AttributeInterface (View source)

Traits

Trait ApplicationAwareTrait A trait used with ApplicationAwareInterface

Properties

protected Application $app from  ApplicationAwareTrait
protected $helpers from  AbstractController
protected $sets from  AbstractController
protected $action from  AbstractController
protected $request from  AbstractController
protected $parameters from  AbstractController
protected $entityManager
protected Key $attributeKey
protected AbstractValue $attributeValue
protected $searchIndexFieldDefinition
protected $requestArray

Methods

setApplication(Application $app)

Setter method for the application

__construct(EntityManager $entityManager)

No description

mixed
getRequest()

No description

setRequest(mixed $request)

No description

requireAsset()

No description

addHeaderItem(string $item)

Adds an item to the view's header. This item will then be automatically printed out before the section of the page.

addFooterItem(string $item)

Adds an item to the view's footer. This item will then be automatically printed out before the section of the page.

set($key, $val)

No description

getSets()

No description

getHelperObjects()

No description

get($key = null, $defaultValue = null)

No description

getTask()

No description

getAction()

No description

getParameters()

No description

on_start()

No description

on_before_render()

No description

isPost() deprecated

No description

post($field = false, $defaultValue = null)

No description

redirect()

No description

runTask($action, $parameters)

No description

runAction($action, $parameters = array())

No description

request($field = false)

No description

setRequestArray($array)

No description

mixed
setAttributeKey($attributeKey)

No description

setAttributeValue($attributeValue)

No description

getAttributeKey()

Returns a Key entity.

mixed
getDisplayValue()

For a DateTime implementation this could for example mean that the value is formatted and localized.

getAttributeValue()

Get Attribute Value object.

getAttributeType()

Returns a Type entity.

exportKey($ak)

No description

importValue(SimpleXMLElement $akv)

No description

importKey(SimpleXMLElement $element)

No description

getValidator()

No description

deleteKey()

No description

deleteValue()

No description

exportValue(SimpleXMLElement $akv)

No description

filterByAttribute(AttributedItemList $list, $value, $comparison = '=')

No description

field($fieldName)

No description

getControlView(ContextInterface $context)

No description

label($customText = false)

No description

getLabelID()

Get the ID to use for label elements

setAttributeType($attributeType)

No description

requestFieldExists()

No description

getView()

No description

string|int
getSearchIndexValue()

This value will be used by the search index.

setupAndRun($method)

No description

getAttributeTypeFileURL($_file)

No description

saveKey(array $data)

This method is called any time an attribute key is created or updated.

duplicateKey($newAK)

No description

createAttributeValueFromRequest()

Is run when an attribute is saved through the standard user interfaces like the sitemap attributes dialog, the attributes panel, or the user attributes slideouts.

Value|null
createDefaultAttributeValue()

Create the default attribute value (if needed).

createAttributeValue($mixed)

Is run whenever $object->setAttribute('my_property_location_attribute', $value) is run through code, with whatever you happen to pass through.

saveForm($data) deprecated

No description

saveValue($mixed) deprecated

No description

searchKeywords($keywords, $queryBuilder)

No description

validateKey($data = false)

No description

getAttributeKeySettingsClass()

No description

createAttributeKeySettings()

No description

retrieveAttributeKeySettings()

No description

getAttributeValueID()

No description

string
getAttributeValueClass()

Is used to determine the name of the entity used to store the attribute value.

getAttributeValueObject()

No description

getAttributeKeySettings()

No description

getIconFormatter()

Return a formatter object that provides an icon that will be shown in the list of attributes.

Details

setApplication(Application $app)

Setter method for the application

Parameters

Application $app

__construct(EntityManager $entityManager)

No description

Parameters

EntityManager $entityManager

mixed getRequest()

No description

Return Value

mixed

setRequest(mixed $request)

No description

Parameters

mixed $request

requireAsset()

No description

addHeaderItem(string $item)

Adds an item to the view's header. This item will then be automatically printed out before the section of the page.

Parameters

string $item

addFooterItem(string $item)

Adds an item to the view's footer. This item will then be automatically printed out before the section of the page.

Parameters

string $item

set($key, $val)

No description

Parameters

$key
$val

getSets()

No description

shouldRunControllerTask()

No description

getHelperObjects()

No description

get($key = null, $defaultValue = null)

No description

Parameters

$key
$defaultValue

getTask()

No description

getAction()

No description

getParameters()

No description

on_start()

No description

on_before_render()

No description

isPost() deprecated

deprecated

No description

post($field = false, $defaultValue = null)

No description

Parameters

$field
$defaultValue

redirect()

No description

runTask($action, $parameters)

No description

Parameters

$action
$parameters

runAction($action, $parameters = array())

No description

Parameters

$action
$parameters

request($field = false)

No description

Parameters

$field

setRequestArray($array)

No description

Parameters

$array

mixed setAttributeKey($attributeKey)

No description

Parameters

$attributeKey

Return Value

mixed

setAttributeValue($attributeValue)

No description

Parameters

$attributeValue

AttributeKeyInterface getAttributeKey()

Returns a Key entity.

A key is mapped with a row from the AttributeKeys table. Use the object for example to retrieve the current attribute handle (e.g. 'meta_title').

Return Value

AttributeKeyInterface

mixed getDisplayValue()

For a DateTime implementation this could for example mean that the value is formatted and localized.

Return Value

mixed

AttributeValueInterface getAttributeValue()

Get Attribute Value object.

Type getAttributeType()

Returns a Type entity.

The Type object is mapped with a row from the AttributeTypes table. Use the object for example to retrieve the current attribute type handle (e.g. 'date_time').

Return Value

Type

exportKey($ak)

No description

Parameters

$ak

importValue(SimpleXMLElement $akv)

No description

Parameters

SimpleXMLElement $akv

importKey(SimpleXMLElement $element)

No description

Parameters

SimpleXMLElement $element

getValidator()

No description

deleteKey()

No description

deleteValue()

No description

exportValue(SimpleXMLElement $akv)

No description

Parameters

SimpleXMLElement $akv

filterByAttribute(AttributedItemList $list, $value, $comparison = '=')

No description

Parameters

AttributedItemList $list
$value
$comparison

field($fieldName)

No description

Parameters

$fieldName

getControlView(ContextInterface $context)

No description

Parameters

ContextInterface $context

label($customText = false)

No description

Parameters

$customText

getLabelID()

Get the ID to use for label elements

setAttributeType($attributeType)

No description

Parameters

$attributeType

requestFieldExists()

No description

getView()

No description

string|int getSearchIndexValue()

This value will be used by the search index.

Return Value

string|int

getSearchIndexFieldDefinition()

No description

setupAndRun($method)

No description

Parameters

$method

getAttributeTypeFileURL($_file)

No description

Parameters

$_file

saveKey(array $data)

This method is called any time an attribute key is created or updated.

$data is simply the POST values from the form.

Parameters

array $data

duplicateKey($newAK)

No description

Parameters

$newAK

AttributeValueInterface createAttributeValueFromRequest()

Is run when an attribute is saved through the standard user interfaces like the sitemap attributes dialog, the attributes panel, or the user attributes slideouts.

Value|null createDefaultAttributeValue()

Create the default attribute value (if needed).

Return Value

Value|null

AttributeValueInterface createAttributeValue($mixed)

Is run whenever $object->setAttribute('my_property_location_attribute', $value) is run through code, with whatever you happen to pass through.

Parameters

$mixed

Return Value

AttributeValueInterface

saveForm($data) deprecated

deprecated

No description

Parameters

$data

saveValue($mixed) deprecated

deprecated

No description

Parameters

$mixed

searchKeywords($keywords, $queryBuilder)

No description

Parameters

$keywords
$queryBuilder

validateKey($data = false)

No description

Parameters

$data

getAttributeKeySettingsClass()

No description

createAttributeKeySettings()

No description

protected retrieveAttributeKeySettings()

No description

getAttributeValueID()

No description

string getAttributeValueClass()

Is used to determine the name of the entity used to store the attribute value.

You can reuse this throughout your controllers, but it's used by the getAttributeValueObject() method in the base controller to retrieve the relevant attribute data value object.

Return Value

string

getAttributeValueObject()

No description

getAttributeKeySettings()

No description

IconFormatterInterface getIconFormatter()

Return a formatter object that provides an icon that will be shown in the list of attributes.

Example implementation: return new FontAwesomeIconFormatter('check-square');

Return Value

IconFormatterInterface