Controller
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
Adds an item to the view's header. This item will then be automatically printed out before the
section of the page.Adds an item to the view's footer. This item will then be automatically printed out before the section of the page.
For a DateTime implementation this could for example mean that the value is formatted and localized.
No description
Get the ID to use for label elements
This value will be used by the search index.
This method is called any time an attribute key is created or updated.
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.
Create the default attribute value (if needed).
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.
No description
Is used to determine the name of the entity used to store the attribute value.
Return a formatter object that provides an icon that will be shown in the list of attributes.
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Used by selectize. Automatically takes a value request and converts it into tag/text key value pairs.
No description
No description
Returns a list of available options optionally filtered by an sql $like statement ex: startswith%.
Convenience methods to retrieve a select attribute key's settings.
No description
No description
Details
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
shouldRunControllerTask()
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
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
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').
mixed
getDisplayValue()
For a DateTime implementation this could for example mean that the value is formatted and localized.
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').
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.
getSearchIndexFieldDefinition()
No description
setupAndRun($method)
No description
getAttributeTypeFileURL($_file)
No description
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.
duplicateKey($newAK)
No description
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).
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
saveForm($data)
deprecated
deprecated
No description
saveValue($mixed)
deprecated
deprecated
No description
searchKeywords($keywords, $queryBuilder)
No description
validateKey($data = false)
No description
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.
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');
type_form()
No description
protected
load()
No description
setAllowedMultipleValues($allow)
No description
setAllowOtherValues($allow)
No description
setOptionDisplayOrder($order)
No description
setOptions($options)
No description
private
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
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.
action_load_autocomplete_values()
No description
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