PHP Class store\components\behaviors\DCategoryBehavior

Author: ElisDN ([email protected])
Inheritance: extends CActiveRecordBehavio\CActiveRecordBehavior
Show file 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 property

protected $_criteria

$_primaryKey protected property

protected $_primaryKey

$_tableName protected property

protected $_tableName

$_tableSchema protected property

protected $_tableSchema

$aliasAttribute public property

model attribute, which defined alias
public $aliasAttribute

$cacheTag public property

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

$defaultCachePrefix public property

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

$defaultCriteria public property

default criteria for all queries
public $defaultCriteria

$iconAltAttribute public property

public $iconAltAttribute

$iconAttribute public 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 property

public $iconTitleAttribute

$linkActiveAttribute public property

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

$requestPathAttribute public property

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

$titleAttribute public property

model attribute used for showing title
public $titleAttribute

$urlAttribute public 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 property

public bool $useCache
return boolean