PHP Class Menu, yupe

Show file Open project: yupe/yupe Class Usage Examples

Public Methods

Method Description
addItem ( $title, $href, $parentId, boolean $regularLink = false ) : boolean Добавляет новый пункт меню в меню
attributeDescriptions ( ) : array
attributeLabels ( ) : array
changeItem ( $oldTitle, $newTitle, $href, $parentId, $regularLink = false ) : boolean Метод изменения пункта меню.
getItems ( $code, integer $parent_id ) : array | mixed
getStatus ( ) : string
getStatusList ( ) : array
model ( string $className = __CLASS__ ) : Menu Returns the static model of the specified AR class.
relations ( ) : array
rules ( ) : array
scopes ( ) : array
search ( ) : CActiveDataProvider Retrieves a list of models based on the current search/filter conditions.
tableName ( ) : string

Protected Methods

Method Description
afterDelete ( )
afterSave ( )

Method Details

addItem() public method

Добавляет новый пункт меню в меню
public addItem ( $title, $href, $parentId, boolean $regularLink = false ) : boolean
$title string - Заголовок
$href string - Ссылка
$parentId int - Родитель
$regularLink boolean - Обычная ссылка
return boolean

afterDelete() protected method

protected afterDelete ( )

afterSave() protected method

protected afterSave ( )

attributeDescriptions() public method

public attributeDescriptions ( ) : array
return array customized attribute descriptions (name=>description)

attributeLabels() public method

public attributeLabels ( ) : array
return array customized attribute labels (name=>label)

changeItem() public method

Метод изменения пункта меню.
public changeItem ( $oldTitle, $newTitle, $href, $parentId, $regularLink = false ) : boolean
$oldTitle string Старое название элемента (по нему осуществяется поиск)
$newTitle string Новое название
$href string Новая ссылка
$parentId int id меню
$regularLink bool Обычная ссылка
return boolean статус выполнения

getItems() public method

public getItems ( $code, integer $parent_id ) : array | mixed
$code
$parent_id integer
return array | mixed

getStatus() public method

public getStatus ( ) : string
return string

getStatusList() public method

public getStatusList ( ) : array
return array

model() public static method

Returns the static model of the specified AR class.
public static model ( string $className = __CLASS__ ) : Menu
$className string active record class name.
return Menu the static model class

relations() public method

public relations ( ) : array
return array relational rules.

rules() public method

public rules ( ) : array
return array validation rules for model attributes.

scopes() public method

public scopes ( ) : array
return array

tableName() public method

public tableName ( ) : string
return string the associated database table name