interface CategoryInterface (View source)

The interface that any attribute category must implement.

Methods

getAttributeKeyByID(int $akID)

Get an attribute key given its ID.

getAttributeKeyByHandle(string $akHandle)

Get an attribute key given its handle.

getList()

Get all the attribute keys.

getSetManager()

Get the set manager.

ArrayCollection|Type[]
getAttributeTypes()

Get the attribute types.

getSearchIndexer()

Get the indexer instance that manages search indexing (if the attribute category supports indexing).

Key
addFromRequest(Type $type, Request $request)

Create a new attribute key starting from the data contained in a request.

Key
updateFromRequest(Key $key, Request $request)

Update an existing attribute key with the data contained in a request.

getAttributeValues(ObjectInterface $object)

Get all the generic attribute values for an object instance.

getAttributeValue(Key $key, ObjectInterface $object)

Get the generic attribute value of an object for a specific key.

deleteKey(Key $key)

Method called when a key is deleted. This is usually used to delete all the values associated to an attribute key.

deleteValue(AttributeValueInterface $value)

Delete an attribute value.

delete()

Delete this category and all the associated attribute keys.

Details

AttributeKeyInterface|null getAttributeKeyByID(int $akID)

Get an attribute key given its ID.

Parameters

int $akID

Return Value

AttributeKeyInterface|null

AttributeKeyInterface|null getAttributeKeyByHandle(string $akHandle)

Get an attribute key given its handle.

Parameters

string $akHandle

Return Value

AttributeKeyInterface|null

AttributeKeyInterface[] getList()

Get all the attribute keys.

Return Value

AttributeKeyInterface[]

SetManagerInterface getSetManager()

Get the set manager.

Return Value

SetManagerInterface

ArrayCollection|Type[] getAttributeTypes()

Get the attribute types.

Return Value

ArrayCollection|Type[]

SearchIndexerInterface|null getSearchIndexer()

Get the indexer instance that manages search indexing (if the attribute category supports indexing).

Return Value

SearchIndexerInterface|null

Key addFromRequest(Type $type, Request $request)

Create a new attribute key starting from the data contained in a request.

Parameters

Type $type

The attribute type to be created

Request $request

The request instance that contains the data

Return Value

Key

Key updateFromRequest(Key $key, Request $request)

Update an existing attribute key with the data contained in a request.

Parameters

Key $key

The attribute key to be updated

Request $request

The request instance that contains the data

Return Value

Key

AttributeValueInterface[] getAttributeValues(ObjectInterface $object)

Get all the generic attribute values for an object instance.

Parameters

ObjectInterface $object

Return Value

AttributeValueInterface[]

AttributeValueInterface|null getAttributeValue(Key $key, ObjectInterface $object)

Get the generic attribute value of an object for a specific key.

Parameters

Key $key
ObjectInterface $object

Return Value

AttributeValueInterface|null

deleteKey(Key $key)

Method called when a key is deleted. This is usually used to delete all the values associated to an attribute key.

Note: this does NOT delete the source key entity. That is done simply by removing the key through Doctrine. Doctrine then calls the Concrete\Core\Attribute\Key\Listener::preRemove method, which runs this.

Parameters

Key $key

deleteValue(AttributeValueInterface $value)

Delete an attribute value.

Parameters

AttributeValueInterface $value

delete()

Delete this category and all the associated attribute keys.