class Category extends Base

Class Category

Properties

static string $pimcoreClass Pimcore Object Class.
static string $staticRoute

Methods

static  string
getPimcoreObjectClass()

get Pimcore implementation class.

from Base
static  Base
create()

Create new instance of Pimcore Object.

from Base
static  int
classId()

returns the class ID of the current object class.

from Base
static  Listing
getList( array $config = array())

No description

from Base
static  Data[]
getMandatoryFields()

No description

from Base
static 
validate($data)

No description

from Base
static  mixed|null
__callStatic($method, $arguments)

No description

from Base
array
toArray()

Object to Array.

from Base
string
getCacheKey()

get cache key

from Base
AdminStyle
getElementAdminStyle()

Admin Element Style.

from Base
save()

No description

from Base
Note
createNote($type)

Create a note for this object.

from Base
AbstractObject
getVariantMaster()

Return Topmost Master if Object is Variant

from Base
bool
isAllowedForShop( Shop $shop)

No description

from Base
bool|string
getUrl($language, $params = array(), $route, bool $reset = false, Shop $shop = null)

No description

from Base
static  array
getAll()

Get all Categories.

static  array
getFirstLevel()

Get first level of categories.

static  array
getAllChildCategories( Category $category)

Returns all Child Categories from $category.

array
getProducts( bool $includeChildCategories = false)

Get Products from the Category.

Zend_Paginator
getProductsPaging( int $page, int $itemsPerPage = 10, array $sort = array('name' => 'name', 'direction' => 'asc'), bool $includeChildCategories = false, string $includeVariants = false)

Get Products from the Category with Paging.

bool
inCategory( Category $category, int $level)

Checks if category is child of hierachy.

int
getLevel()

Get Level of Category.

array
getCatChilds()

Returns all Children from this Category.

bool|Asset
getDefaultImage()

Get default image.

bool|Asset
getImage()

Get image.

getHierarchy()

Get Category hierarchy.

array
getChildCategories()

Get all child Categories.

bool|string
getCategoryUrl($language, bool $reset = false, Shop $shop = null)

get url for category -> returns false if the category is not available for the shop

getParentCategory()

No description

setParentCategory( Category $parentCategory)

No description

Asset
getCategoryImage()

No description

setCategoryImage( Asset $categoryImage)

No description

int[]
getShops()

No description

setShops( int[] $shops)

No description

Filter|null
getFilterDefinition()

No description

setFilterDefinition( Filter $filterDefinition)

No description

Details

in Base at line line 50
static string getPimcoreObjectClass()

get Pimcore implementation class.

Return Value

string

Exceptions

Exception

in Base at line line 68
static Base create()

Create new instance of Pimcore Object.

Return Value

Base

Exceptions

Exception

in Base at line line 84
static int classId()

returns the class ID of the current object class.

Return Value

int

in Base at line line 98
static Listing getList( array $config = array())

Parameters

array $config

Return Value

Listing

Exceptions

Exception

in Base at line line 131
static Data[] getMandatoryFields()

Return Value

Data[]

Exceptions

Exception

in Base at line line 156
static validate($data)

Parameters

$data

Exceptions

ValidationException

in Base at line line 173
static mixed|null __callStatic($method, $arguments)

Parameters

$method
$arguments

Return Value

mixed|null

Exceptions

Exception

in Base at line line 194
array toArray()

Object to Array.

Return Value

array

in Base at line line 204
string getCacheKey()

get cache key

Return Value

string

in Base at line line 224
AdminStyle getElementAdminStyle()

Admin Element Style.

Return Value

AdminStyle

in Base at line line 247
Base save()

Return Value

Base

Exceptions

Exception
Exception
ValidationException

in Base at line line 267
Note createNote($type)

Create a note for this object.

Parameters

$type string

Return Value

Note $note

in Base at line line 289
AbstractObject getVariantMaster()

Return Topmost Master if Object is Variant

Return Value

AbstractObject

in Base at line line 304
bool isAllowedForShop( Shop $shop)

Parameters

Shop $shop

Return Value

bool

in Base at line line 323
bool|string getUrl($language, $params = array(), $route, bool $reset = false, Shop $shop = null)

Parameters

$language
$params
$route
bool $reset
Shop $shop

Return Value

bool|string

at line line 53
static array getAll()

Get all Categories.

Return Value

array

at line line 65
static array getFirstLevel()

Get first level of categories.

Return Value

array

at line line 80
static array getAllChildCategories( Category $category)

Returns all Child Categories from $category.

Parameters

Category $category

Return Value

array

at line line 106
array getProducts( bool $includeChildCategories = false)

Get Products from the Category.

Parameters

bool $includeChildCategories

Return Value

array

at line line 139
Zend_Paginator getProductsPaging( int $page, int $itemsPerPage = 10, array $sort = array('name' => 'name', 'direction' => 'asc'), bool $includeChildCategories = false, string $includeVariants = false)

Get Products from the Category with Paging.

Parameters

int $page
int $itemsPerPage
array $sort
bool $includeChildCategories
string $includeVariants

Return Value

Zend_Paginator

Exceptions

Zend_Paginator_Exception

at line line 183
bool inCategory( Category $category, int $level)

Checks if category is child of hierachy.

Parameters

Category $category
int $level to check hierachy (0 = topMost)

Return Value

bool

at line line 198
int getLevel()

Get Level of Category.

Return Value

int

at line line 208
array getCatChilds()

Returns all Children from this Category.

Return Value

array

at line line 218
bool|Asset getDefaultImage()

Get default image.

Return Value

bool|Asset

at line line 238
bool|Asset getImage()

Get image.

Return Value

bool|Asset

at line line 252
Category[] getHierarchy()

Get Category hierarchy.

Return Value

Category[]

at line line 272
array getChildCategories()

Get all child Categories.

Return Value

array

at line line 289
bool|string getCategoryUrl($language, bool $reset = false, Shop $shop = null)

get url for category -> returns false if the category is not available for the shop

Parameters

$language
bool $reset
Shop $shop

Return Value

bool|string

at line line 299
Category getParentCategory()

Return Value

Category

Exceptions

ObjectUnsupportedException

at line line 309
setParentCategory( Category $parentCategory)

Parameters

Category $parentCategory

Exceptions

ObjectUnsupportedException

at line line 319
Asset getCategoryImage()

Return Value

Asset

Exceptions

ObjectUnsupportedException

at line line 329
setCategoryImage( Asset $categoryImage)

Parameters

Asset $categoryImage

Exceptions

ObjectUnsupportedException

at line line 339
int[] getShops()

Return Value

int[]

Exceptions

ObjectUnsupportedException

at line line 349
setShops( int[] $shops)

Parameters

int[] $shops

Exceptions

ObjectUnsupportedException

at line line 359
Filter|null getFilterDefinition()

Return Value

Filter|null

Exceptions

ObjectUnsupportedException

at line line 369
setFilterDefinition( Filter $filterDefinition)

Parameters

Filter $filterDefinition

Exceptions

ObjectUnsupportedException