class TypeFactory (View source)

Factory class for creating and retrieving instances of the Attribute type entity.

Properties

protected EntityManager $entityManager
protected Environment $environment
protected CategoryService $categoryService

Methods

__construct(Environment $environment, EntityManager $entityManager, CategoryService $categoryService)

Initialize the instance.

Type|null
getByHandle(string $atHandle)

Search an attribute type given its handle.

Type[]
getListByPackage(Package $package)

Get the list of attribute types defined by a package.

Type|null
getByID(int $atID)

Search an attribute type given its id.

add(string $atHandle, string $atName, Package|null $pkg = null)

Create a new attribute type.

Type[]
getList(string|false|null $akCategoryHandle = false)

Get the list of attribute types.

Type[]
getAttributeTypeList(mixed $akCategoryHandle = false) deprecated

No description

exportTranslations() deprecated

No description

installDatabase(Type $type)

No description

Details

__construct(Environment $environment, EntityManager $entityManager, CategoryService $categoryService)

Initialize the instance.

Parameters

Environment $environment
EntityManager $entityManager
CategoryService $categoryService

Type|null getByHandle(string $atHandle)

Search an attribute type given its handle.

Parameters

string $atHandle

Return Value

Type|null

Type[] getListByPackage(Package $package)

Get the list of attribute types defined by a package.

Parameters

Package $package

Return Value

Type[]

Type|null getByID(int $atID)

Search an attribute type given its id.

Parameters

int $atID

Return Value

Type|null

Type add(string $atHandle, string $atName, Package|null $pkg = null)

Create a new attribute type.

Parameters

string $atHandle

The handle of the new attribute type

string $atName

The name of the new attribute type

Package|null $pkg

The package defining the attribute type (if any)

Return Value

Type

Type[] getList(string|false|null $akCategoryHandle = false)

Get the list of attribute types.

Parameters

string|false|null $akCategoryHandle

The handle of the attribute category (if falsy, all the attribute types will be returned)

Return Value

Type[]

Type[] getAttributeTypeList(mixed $akCategoryHandle = false) deprecated

deprecated use the getList method (same arguments and same results)

No description

Parameters

mixed $akCategoryHandle

Return Value

Type[]

exportTranslations() deprecated

deprecated

No description

protected installDatabase(Type $type)

No description

Parameters

Type $type