AttributeInterface
interface AttributeInterface (View source)
Methods
AttributeInterface constructor.
Get Attribute Value object.
For a DateTime implementation this could for example mean that the value is formatted and localized.
Returns a Type entity.
Returns a Key entity.
No description
Return a formatter object that provides an icon that will be shown in the list of attributes.
This method is called any time an attribute key is created or updated.
This value will be used by the search index.
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.
Is run whenever $object->setAttribute('my_property_location_attribute', $value) is run through code, with whatever you happen to pass through.
Is used to determine the name of the entity used to store the attribute value.
Details
__construct(EntityManager $entityManager)
AttributeInterface constructor.
AttributeValueInterface
getAttributeValue()
Get Attribute Value object.
mixed
getDisplayValue()
For a DateTime implementation this could for example mean that the value is formatted and localized.
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').
setAttributeType(Type $type)
No description
AttributeKeyInterface|Key
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
setAttributeKey($key)
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|null|void
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.
string|int
getSearchIndexValue()
This value will be used by the search index.
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.
AttributeValueInterface
createAttributeValue($mixed)
Is run whenever $object->setAttribute('my_property_location_attribute', $value) is run through code, with whatever you happen to pass through.
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.
setAttributeObject(ObjectInterface $object)
Set the subject for which the value is being managed.