class Controller extends Controller (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 from  Controller
protected Key $attributeKey from  Controller
protected AbstractValue $attributeValue from  Controller
protected $searchIndexFieldDefinition
protected $requestArray from  Controller
private $akSelectAllowMultipleValues
private $akSelectAllowOtherValues
private $akSelectOptionDisplayOrder

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($akey)

No description

importValue(SimpleXMLElement $akv)

No description

importKey(SimpleXMLElement $akey)

No description

getValidator()

No description

deleteKey()

No description

deleteValue()

No description

exportValue(SimpleXMLElement $akn)

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($value)

Sets select options for a particular attribute If the $value == string, then 1 item is selected if array, then multiple, but only if the attribute in question is a select multiple Note, items CANNOT be added to the pool (even if the attribute allows it) through this process.

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.

type_form()

No description

load()

No description

setAllowedMultipleValues($allow)

No description

setAllowOtherValues($allow)

No description

setOptionDisplayOrder($order)

No description

setOptions($options)

No description

getSelectValuesFromPost()

No description

form()

No description

search()

No description

getOptionByID($id)

No description

getOptionByValue($value, $attributeKey = false)

No description

validateValue()

No description

validateForm($p)

No description

searchForm($list)

No description

getSelectedOptions()

No description

loadSelectedTagValueFromPost($value)

Used by selectize. Automatically takes a value request and converts it into tag/text key value pairs.

getOptionUsageArray($parentPage = false, $limit = 9999)

No description

getOptions($keywords = null)

Returns a list of available options optionally filtered by an sql $like statement ex: startswith%.

getAllowMultipleValues()

Convenience methods to retrieve a select attribute key's settings.

getAllowOtherValues()

No description

getOptionDisplayOrder()

No description

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($akey)

No description

Parameters

$akey

importValue(SimpleXMLElement $akv)

No description

Parameters

SimpleXMLElement $akv

importKey(SimpleXMLElement $akey)

No description

Parameters

SimpleXMLElement $akey

getValidator()

No description

deleteKey()

No description

deleteValue()

No description

exportValue(SimpleXMLElement $akn)

No description

Parameters

SimpleXMLElement $akn

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($value)

Sets select options for a particular attribute If the $value == string, then 1 item is selected if array, then multiple, but only if the attribute in question is a select multiple Note, items CANNOT be added to the pool (even if the attribute allows it) through this process.

Items should now be added to the database if they don't exist already & if the allow checkbox is checked under the attribute settings Code from this bug - http://www.concrete5.org/index.php?cID=595692

Parameters

$value

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

type_form()

No description

protected load()

No description

setAllowedMultipleValues($allow)

No description

Parameters

$allow

setAllowOtherValues($allow)

No description

Parameters

$allow

setOptionDisplayOrder($order)

No description

Parameters

$order

setOptions($options)

No description

Parameters

$options

private getSelectValuesFromPost()

No description

form()

No description

No description

getOptionByID($id)

No description

Parameters

$id

getOptionByValue($value, $attributeKey = false)

No description

Parameters

$value
$attributeKey

validateValue()

No description

validateForm($p)

No description

Parameters

$p

searchForm($list)

No description

Parameters

$list

getSelectedOptions()

No description

protected loadSelectedTagValueFromPost($value)

Used by selectize. Automatically takes a value request and converts it into tag/text key value pairs.

New options are just text/tag, whereas existing ones are SelectAttributeOption:ID/text.

Parameters

$value

action_load_autocomplete_values()

No description

getOptionUsageArray($parentPage = false, $limit = 9999)

No description

Parameters

$parentPage
$limit

getOptions($keywords = null)

Returns a list of available options optionally filtered by an sql $like statement ex: startswith%.

Parameters

$keywords

getAllowMultipleValues()

Convenience methods to retrieve a select attribute key's settings.

getAllowOtherValues()

No description

getOptionDisplayOrder()

No description