PHP Class store\components\behaviors\DCategoryBehavior

Author: ElisDN ([email protected])
Inheritance: extends CActiveRecordBehavio\CActiveRecordBehavior
显示文件 Open project: yupe/yupe

Public Properties

Property Type Description
$aliasAttribute model attribute, which defined alias
$cacheTag Тег, по которому будут кешироваться записи
$defaultCachePrefix Если не будет указан конкретный тег, по которому происходит кеширование моделей, тег будет сформирован из префикса + класс модели
$defaultCriteria default criteria for all queries
$iconAltAttribute
$iconAttribute model property, which contains icon. Optionally for 'image' value your model can have 'image' attribute or getImage() method, which construct correct url for using our getMenuList().
$iconTitleAttribute
$linkActiveAttribute model property, which return true for active menu item. Optionally declare own getLinkActive() method in your model.
$requestPathAttribute set this request property if you can use default getLinkActive() method
$titleAttribute model attribute used for showing title
$urlAttribute model property, which contains url. Optionally your model can have 'url' attribute or getUrl() method, which construct correct url for using our getMenuList().
$useCache boolean

Protected Properties

Property Type Description
$_criteria
$_primaryKey
$_tableName
$_tableSchema

Public Methods

Method Description
afterDelete ( CEvent $event )
afterSave ( CEvent $event )
findByAlias ( $alias ) : CActiveRecord Finds model by alias attribute
getAliasList ( ) : array Returns associated array ($alias=>$title, $alias=>$title, .
getArray ( ) : array Return primary keys of all items
getAssocList ( ) : array Returns associated array ($id=>$title, $id=>$title, .
getLinkActive ( ) : boolean Optional redeclare this method in your model for use (@link getMenuList()) or define in (@link requestPathAttribute) your $_GET attribute for url matching
getMenuList ( ) : array Returns items for zii.widgets.CMenu widget
getUrl ( ) : string Redeclare this method in your model for use of (@link getMenuList()) method
getUrlList ( ) : array Returns associated array ($url=>$title, $url=>$title, .

Protected Methods

Method Description
aliasAttributes ( $attributes ) : array
cached ( null $model = null ) : CComponent | null
clearOwnerCriteria ( )
createFindCommand ( $criteria ) : CDbCommand
getCacheTag ( ) : string
getFullAssocData ( $attributes ) : array | CDbDataReader
getOriginalCriteria ( ) : mixed
getOwnerCriteria ( ) : mixed
getPrimaryKeyAttribute ( ) : mixed
getTableName ( ) : mixed
getTableSchema ( ) : mixed

Method Details

afterDelete() public method

public afterDelete ( CEvent $event )
$event CEvent

afterSave() public method

public afterSave ( CEvent $event )
$event CEvent

aliasAttributes() protected method

protected aliasAttributes ( $attributes ) : array
$attributes
return array

cached() protected method

protected cached ( null $model = null ) : CComponent | null
$model null
return CComponent | null

clearOwnerCriteria() protected method

protected clearOwnerCriteria ( )

createFindCommand() protected method

protected createFindCommand ( $criteria ) : CDbCommand
$criteria
return CDbCommand

findByAlias() public method

Finds model by alias attribute
public findByAlias ( $alias ) : CActiveRecord
$alias
return CActiveRecord model

getAliasList() public method

..)
public getAliasList ( ) : array
return array

getArray() public method

Return primary keys of all items
public getArray ( ) : array
return array

getAssocList() public method

..)
public getAssocList ( ) : array
return array

getCacheTag() protected method

protected getCacheTag ( ) : string
return string

getFullAssocData() protected method

protected getFullAssocData ( $attributes ) : array | CDbDataReader
$attributes
return array | CDbDataReader

getLinkActive() public method

Optional redeclare this method in your model for use (@link getMenuList()) or define in (@link requestPathAttribute) your $_GET attribute for url matching
public getLinkActive ( ) : boolean
return boolean true if current request url matches with category alias

getMenuList() public method

Returns items for zii.widgets.CMenu widget
public getMenuList ( ) : array
return array

getOriginalCriteria() protected method

protected getOriginalCriteria ( ) : mixed
return mixed

getOwnerCriteria() protected method

protected getOwnerCriteria ( ) : mixed
return mixed

getPrimaryKeyAttribute() protected method

protected getPrimaryKeyAttribute ( ) : mixed
return mixed

getTableName() protected method

protected getTableName ( ) : mixed
return mixed

getTableSchema() protected method

protected getTableSchema ( ) : mixed
return mixed

getUrl() public method

Redeclare this method in your model for use of (@link getMenuList()) method
public getUrl ( ) : string
return string

getUrlList() public method

..)
public getUrlList ( ) : array
return array

Property Details

$_criteria protected_oe property

protected $_criteria

$_primaryKey protected_oe property

protected $_primaryKey

$_tableName protected_oe property

protected $_tableName

$_tableSchema protected_oe property

protected $_tableSchema

$aliasAttribute public_oe property

model attribute, which defined alias
public $aliasAttribute

$cacheTag public_oe property

Тег, по которому будут кешироваться записи
public $cacheTag

$defaultCachePrefix public_oe property

Если не будет указан конкретный тег, по которому происходит кеширование моделей, тег будет сформирован из префикса + класс модели
public $defaultCachePrefix

$defaultCriteria public_oe property

default criteria for all queries
public $defaultCriteria

$iconAltAttribute public_oe property

public $iconAltAttribute

$iconAttribute public_oe property

model property, which contains icon. Optionally for 'image' value your model can have 'image' attribute or getImage() method, which construct correct url for using our getMenuList().
public $iconAttribute

$iconTitleAttribute public_oe property

public $iconTitleAttribute

$linkActiveAttribute public_oe property

model property, which return true for active menu item. Optionally declare own getLinkActive() method in your model.
public $linkActiveAttribute

$requestPathAttribute public_oe property

set this request property if you can use default getLinkActive() method
public $requestPathAttribute

$titleAttribute public_oe property

model attribute used for showing title
public $titleAttribute

$urlAttribute public_oe property

model property, which contains url. Optionally your model can have 'url' attribute or getUrl() method, which construct correct url for using our getMenuList().
public $urlAttribute

$useCache public_oe property

public bool $useCache
return boolean