ExpressCategory
class ExpressCategory extends AbstractCategory (View source)
Properties
protected EntityManager | $entityManager | The EntityManager instance. |
from AbstractCategory |
protected | $entity | from AbstractCategory | |
protected Application | $application | The Application instance. |
from AbstractCategory |
protected SetManagerInterface|null | $setManager | The instance of the SetManagerInterface (if set). |
from AbstractCategory |
protected Entity | $expressEntity | The Express entity owning this attribute category. |
Methods
Initialize the instance.
Get the repository for the attribute keys.
Get the repository for the attribute values.
Create a new attribute key.
Get the indexer instance that manages search indexing (if the attribute category supports indexing).
Get all the attribute keys.
Get the list of attribute keys that are searchable.
Get the list of attribute keys that are searchable and indexed.
Get an attribute key given its handle.
Get an attribute key given its ID.
Add a new attribute key.
Create a new attribute key starting from the data contained in a request.
Import a new attribute key from a SimpleXMLElement instance.
Update an existing attribute key with the data contained in a request.
Get the EntityManager instance.
Get the object to be used to update attribute keys with the data contained in a Symfony\Component\HttpFoundation\Request instance.
Get the object to be used to update attribute keys with the data contained in a SimpleXMLElement instance.
Get the name of the indexing table (return false if there's no indexing table).
Get the Express entity owning this attribute category.
Get the value of the primary key column of the indexing table that identifies the object to be indexed.
Get the definition of the indexing table, excluding attribute-related fields (return false if there's no indexing table).
Get the set manager.
Does this attribute category support attribute sets?
Get the attribute types.
Get the generic attribute value of an object for a specific key.
Details
__construct(Entity $entity, Application $application, EntityManager $entityManager)
Initialize the instance.
EntityRepository
getAttributeKeyRepository()
Get the repository for the attribute keys.
EntityRepository
getAttributeValueRepository()
Get the repository for the attribute values.
Key
createAttributeKey()
Create a new attribute key.
SearchIndexerInterface|null
getSearchIndexer()
Get the indexer instance that manages search indexing (if the attribute category supports indexing).
AttributeKeyInterface[]
getList()
Get all the attribute keys.
Key[]
getSearchableList()
Get the list of attribute keys that are searchable.
Key[]
getSearchableIndexedList()
Get the list of attribute keys that are searchable and indexed.
AttributeKeyInterface|null
getAttributeKeyByHandle($handle)
Get an attribute key given its handle.
AttributeKeyInterface|null
getAttributeKeyByID(int $akID)
Get an attribute key given its ID.
delete()
Delete this category and all the associated attribute keys.
Key
add(Type|string $type, Key|array $key, Settings|null $settings = null, Package|null $pkg = null)
Add a new attribute key.
Key
addFromRequest(Type $type, Request $request)
Create a new attribute key starting from the data contained in a request.
Key
import(Type $type, SimpleXMLElement $element, Package $package = null)
Import a new attribute key from a SimpleXMLElement instance.
Key
updateFromRequest(Key $key, Request $request)
Update an existing attribute key with the data contained in a request.
EntityManager
getEntityManager()
No description
setEntityManager(EntityManager $entityManager)
Get the EntityManager instance.
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.
deleteValue(AttributeValueInterface $attributeValue)
Delete an attribute value.
RequestLoaderInterface
getRequestLoader()
Get the object to be used to update attribute keys with the data contained in a Symfony\Component\HttpFoundation\Request instance.
ImportLoaderInterface
getImportLoader()
Get the object to be used to update attribute keys with the data contained in a SimpleXMLElement instance.
Key|null
getByID(int $akID)
deprecated
deprecated
No description
Key|null
getByHandle(string $akHandle)
deprecated
deprecated
No description
string|false
getIndexedSearchTable()
Get the name of the indexing table (return false if there's no indexing table).
Entity
getExpressEntity()
Get the Express entity owning this attribute category.
mixed
getIndexedSearchPrimaryKeyValue(object $mixed)
Get the value of the primary key column of the indexing table that identifies the object to be indexed.
array|false
getSearchIndexFieldDefinition()
Get the definition of the indexing table, excluding attribute-related fields (return false if there's no indexing table).
The resulting array can have these keys:
- columns: an array describing the table columns
- primary: an array containing the names of the columns that define the table primary key
- foreignKeys: an array describing the foreign keys.
SetManagerInterface
getSetManager()
Get the set manager.
bool
allowAttributeSets()
Does this attribute category support attribute sets?
ArrayCollection|Type[]
getAttributeTypes()
Get the attribute types.
AttributeValueInterface[]
getAttributeValues(Entry $entry)
Get all the generic attribute values for an object instance.
AttributeValueInterface|null
getAttributeValue(Key $key, Entry $entry)
Get the generic attribute value of an object for a specific key.