class Category extends AbstractEntity

Category

Methods

offsetExists($offset)

No description

offsetSet($offset, $value)

No description

offsetGet($offset)

No description

offsetUnset($offset)

No description

setPropertiesFromArray(array $arrProps, array $excludeAttribute = array(), ReflectionClass $parentClass = null)

引数の連想配列を元にプロパティを設定します.

array
toArray(array $excludeAttribute = array(), ReflectionClass $parentClass = null)

プロパティの値を連想配列で返します.

object
copyProperties(object $srcObject, array $excludeAttribute = array())

コピー元のオブジェクトのフィールド名を指定して、同名のフィールドに値をコピー

string
__toString()

No description

integer
countBranches()

No description

calcChildrenRank(EntityManager $em, integer $rank)

No description

getParents()

No description

getPath()

No description

getNameWithLevel()

No description

getDescendants()

No description

getSelfAndDescendants()

No description

bool
hasProductCategories()

カテゴリに紐づく商品があるかどうかを調べる.

__construct()

Constructor

integer
getId()

Get id

setName(string $name)

Set name

string
getName()

Get name

setLevel(integer $level)

Set level

integer
getLevel()

Get level

setRank(integer $rank)

Set rank

integer
getRank()

Get rank

setCreateDate(DateTime $createDate)

Set create_date

getCreateDate()

Get create_date

setUpdateDate(DateTime $updateDate)

Set update_date

getUpdateDate()

Get update_date

setDelFlg(integer $delFlg)

Set del_flg

integer
getDelFlg()

Get del_flg

addProductCategory(ProductCategory $productCategories)

Add ProductCategories

removeProductCategory(ProductCategory $productCategories)

Remove ProductCategories

Collection
getProductCategories()

Get ProductCategories

addChild(Category $children)

Add Children

removeChild(Category $children)

Remove Children

Collection
getChildren()

Get Children

setParent(Category $parent = null)

Set Parent

getParent()

Get Parent

setCreator(Member $creator = null)

Set Creator

getCreator()

Get Creator

Details

in AbstractEntity at line 32
offsetExists($offset)

Parameters

$offset

in AbstractEntity at line 39
offsetSet($offset, $value)

Parameters

$offset
$value

in AbstractEntity at line 43
offsetGet($offset)

Parameters

$offset

in AbstractEntity at line 54
offsetUnset($offset)

Parameters

$offset

in AbstractEntity at line 66
setPropertiesFromArray(array $arrProps, array $excludeAttribute = array(), ReflectionClass $parentClass = null)

引数の連想配列を元にプロパティを設定します.

DBから取り出した連想配列を, プロパティへ設定する際に使用します.

Parameters

array $arrProps
array $excludeAttribute
ReflectionClass $parentClass

in AbstractEntity at line 99
array toArray(array $excludeAttribute = array(), ReflectionClass $parentClass = null)

プロパティの値を連想配列で返します.

DBを更新する場合などで, 連想配列の値を取得したい場合に使用します.

Parameters

array $excludeAttribute
ReflectionClass $parentClass

Return Value

array 連想配列のプロパティの値

in AbstractEntity at line 139
object copyProperties(object $srcObject, array $excludeAttribute = array())

コピー元のオブジェクトのフィールド名を指定して、同名のフィールドに値をコピー

Parameters

object $srcObject コピー元のオブジェクト
array $excludeAttribute 除外したいフィールド名の配列

Return Value

object

at line 38
string __toString()

Return Value

string

at line 46
integer countBranches()

Return Value

integer

at line 62
Category calcChildrenRank(EntityManager $em, integer $rank)

Parameters

EntityManager $em
integer $rank

Return Value

Category

at line 74
getParents()

at line 82
getPath()

at line 100
getNameWithLevel()

at line 105
getDescendants()

at line 122
getSelfAndDescendants()

at line 137
bool hasProductCategories()

カテゴリに紐づく商品があるかどうかを調べる.

ProductCategoriesはExtra Lazyのため, lengthやcountで評価した際にはCOUNTのSQLが発行されるが, COUNT自体が重いので, LIMIT 1で取得し存在チェックを行う.

Return Value

bool

See also

http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/working-with-associations.html#filtering-collections

at line 205
__construct()

Constructor

at line 216
integer getId()

Get id

Return Value

integer

at line 227
Category setName(string $name)

Set name

Parameters

string $name

Return Value

Category

at line 239
string getName()

Get name

Return Value

string

at line 250
Category setLevel(integer $level)

Set level

Parameters

integer $level

Return Value

Category

at line 262
integer getLevel()

Get level

Return Value

integer

at line 273
Category setRank(integer $rank)

Set rank

Parameters

integer $rank

Return Value

Category

at line 285
integer getRank()

Get rank

Return Value

integer

at line 296
Category setCreateDate(DateTime $createDate)

Set create_date

Parameters

DateTime $createDate

Return Value

Category

at line 308
DateTime getCreateDate()

Get create_date

Return Value

DateTime

at line 319
Category setUpdateDate(DateTime $updateDate)

Set update_date

Parameters

DateTime $updateDate

Return Value

Category

at line 331
DateTime getUpdateDate()

Get update_date

Return Value

DateTime

at line 342
Category setDelFlg(integer $delFlg)

Set del_flg

Parameters

integer $delFlg

Return Value

Category

at line 354
integer getDelFlg()

Get del_flg

Return Value

integer

at line 365
Category addProductCategory(ProductCategory $productCategories)

Add ProductCategories

Parameters

ProductCategory $productCategories

Return Value

Category

at line 377
removeProductCategory(ProductCategory $productCategories)

Remove ProductCategories

Parameters

ProductCategory $productCategories

at line 387
Collection getProductCategories()

Get ProductCategories

Return Value

Collection

at line 398
Category addChild(Category $children)

Add Children

Parameters

Category $children

Return Value

Category

at line 410
removeChild(Category $children)

Remove Children

Parameters

Category $children

at line 420
Collection getChildren()

Get Children

Return Value

Collection

at line 431
Category setParent(Category $parent = null)

Set Parent

Parameters

Category $parent

Return Value

Category

at line 443
Category getParent()

Get Parent

Return Value

Category

at line 454
Category setCreator(Member $creator = null)

Set Creator

Parameters

Member $creator

Return Value

Category

at line 466
Member getCreator()

Get Creator

Return Value

Member