class UserCategory extends AbstractStandardCategory (View source)

Traits

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 $categoryEntity from  StandardCategoryTrait

Methods

__construct(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.

getSearchIndexer()

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

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.

getCacheNamespace()

No description

getAttributeKeyByHandle($handle)

Get an attribute key given its handle.

getAttributeKeyByHandleUncached($handle)

No description

getAttributeKeyByID(int $akID)

Get an attribute key given its ID.

delete()

No description

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|null $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.

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.

deleteValue(AttributeValueInterface $attributeValue)

Delete an attribute value.

getRequestLoader()

Get the object to be used to update attribute keys with the data contained in a Symfony\Component\HttpFoundation\Request instance.

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

No description

Key|null
getByHandle(string $akHandle) deprecated

No description

setCategoryEntity(Category $category)

No description

getCategoryEntity()

No description

getSetManager()

No description

addSet(mixed $handle, mixed $name, mixed|null $pkg = null, mixed|null $locked = null) deprecated

No description

getAttributeTypes()

No description

getAttributeValueEntity(string $cacheKey, array $parameters)

No description

string|false
getIndexedSearchTable()

Get the name of the indexing table (return false if there's no indexing table).

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).

getMemberListList()

Get the attribute keys to be displayed in the member list page.

getPublicProfileList()

Get the attribute keys to be displayed in the public profile page.

getRegistrationList()

Get the attribute keys to be displayed in the users' registration page.

getEditableInProfileList()

Get the attribute keys that can be modified in the user profile page.

getAttributeValues(User|UserInfo $user)

Get all the generic attribute values for an object instance.

getAttributeValue(Key $key, User|UserInfo $user)

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

saveFromRequest(Key $key, Request $request)

Update the user attribute key with the data received from POST.

Details

__construct(Application $application, EntityManager $entityManager)

Initialize the instance.

Parameters

Application $application

the Application instance

EntityManager $entityManager

the EntityManager instance

EntityRepository getAttributeKeyRepository()

Get the repository for the attribute keys.

Return Value

EntityRepository

See also

AbstractCategory::getAttributeKeyRepository

EntityRepository getAttributeValueRepository()

Get the repository for the attribute values.

Return Value

EntityRepository

See also

AbstractCategory::getAttributeValueRepository

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.

Return Value

Key[]

Key[] getSearchableIndexedList()

Get the list of attribute keys that are searchable and indexed.

Return Value

Key[]

getCacheNamespace()

No description

AttributeKeyInterface|null getAttributeKeyByHandle($handle)

Get an attribute key given its handle.

Parameters

$handle

Return Value

AttributeKeyInterface|null

See also

CategoryInterface::getAttributeKeyByHandle

getAttributeKeyByHandleUncached($handle)

No description

Parameters

$handle

AttributeKeyInterface|null getAttributeKeyByID(int $akID)

Get an attribute key given its ID.

Parameters

int $akID

Return Value

AttributeKeyInterface|null

See also

CategoryInterface::getAttributeKeyByID

delete()

No description

Key add(Type|string $type, Key|array $key, Settings|null $settings = null, Package|null $pkg = null)

Add a new attribute key.

Parameters

Type|string $type

the attribute type (or its handle)

Key|array $key

an empty attribute key, or an array with keys 'akHandle' (the attribute key handle), 'akName' (the attribute key name) and optionally 'asID' (the ID of the attribute set)

Settings|null $settings

the attribute key settings (if not specified, a new settings instance will be created)

Package|null $pkg

the entity of the package that's creating the attribute key

Return Value

Key

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

See also

AbstractCategory::addFromRequest

Key import(Type $type, SimpleXMLElement $element, Package|null $package = null)

Import a new attribute key from a SimpleXMLElement instance.

Parameters

Type $type

the type of the attribute key to be created

SimpleXMLElement $element

the SimpleXMLElement instance containing the data of the attribute key to be created

Package|null $package

the entity of the package that's creating the attribute key (if applicable)

Return Value

Key

See also

AbstractCategory::import

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

See also

AbstractCategory::updateFromRequest

abstract getEntityManager()

No description

setEntityManager(EntityManager $entityManager)

Get the EntityManager instance.

Parameters

EntityManager $entityManager

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

See also

CategoryInterface::deleteKey

deleteValue(AttributeValueInterface $attributeValue)

Delete an attribute value.

Parameters

AttributeValueInterface $attributeValue

See also

CategoryInterface::deleteValue

RequestLoaderInterface getRequestLoader()

Get the object to be used to update attribute keys with the data contained in a Symfony\Component\HttpFoundation\Request instance.

Return Value

RequestLoaderInterface

ImportLoaderInterface getImportLoader()

Get the object to be used to update attribute keys with the data contained in a SimpleXMLElement instance.

Return Value

ImportLoaderInterface

Key|null getByID(int $akID) deprecated

deprecated use the getAttributeKeyByID method

No description

Parameters

int $akID

Return Value

Key|null

Key|null getByHandle(string $akHandle) deprecated

deprecated use the getAttributeKeyByHandle method

No description

Parameters

string $akHandle

Return Value

Key|null

setCategoryEntity(Category $category)

No description

Parameters

Category $category

getCategoryEntity()

No description

getSetManager()

No description

addSet(mixed $handle, mixed $name, mixed|null $pkg = null, mixed|null $locked = null) deprecated

deprecated

No description

Parameters

mixed $handle
mixed $name
mixed|null $pkg
mixed|null $locked

getAttributeTypes()

No description

associateAttributeKeyType(Type $type)

No description

Parameters

Type $type

protected getAttributeValueEntity(string $cacheKey, array $parameters)

No description

Parameters

string $cacheKey
array $parameters

string|false getIndexedSearchTable()

Get the name of the indexing table (return false if there's no indexing table).

Return Value

string|false

See also

StandardSearchIndexerInterface::getIndexedSearchTable

mixed getIndexedSearchPrimaryKeyValue(object $mixed)

Get the value of the primary key column of the indexing table that identifies the object to be indexed.

Parameters

object $mixed

The object for which we need the identifier

Return Value

mixed

See also

StandardSearchIndexerInterface::getIndexedSearchPrimaryKeyValue

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.

UserKey[] getMemberListList()

Get the attribute keys to be displayed in the member list page.

Return Value

UserKey[]

UserKey[] getPublicProfileList()

Get the attribute keys to be displayed in the public profile page.

Return Value

UserKey[]

UserKey[] getRegistrationList()

Get the attribute keys to be displayed in the users' registration page.

Return Value

UserKey[]

UserKey[] getEditableInProfileList()

Get the attribute keys that can be modified in the user profile page.

Return Value

UserKey[]

AttributeValueInterface[] getAttributeValues(User|UserInfo $user)

Get all the generic attribute values for an object instance.

AttributeValueInterface|null getAttributeValue(Key $key, User|UserInfo $user)

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

Parameters

Key $key
User|UserInfo $user

Return Value

AttributeValueInterface|null

See also

CategoryInterface::getAttributeValue

protected UserKey saveFromRequest(Key $key, Request $request)

Update the user attribute key with the data received from POST.

Parameters

Key $key

The user attribute key to be updated

Request $request

The request containing the posted data

Return Value

UserKey