PHP Class Xpressengine\Menu\Repositories\MemoryDecorator

Author: XE Developers ([email protected])
Inheritance: implements Xpressengine\Menu\MenuRepository
显示文件 Open project: xpressengine/xpressengine

Protected Properties

Property Type Description
$bag array Data bag

Public Methods

Method Description
all ( string $siteKey, array $with = [] ) : Menu[] Get all menu
createItemModel ( Menu $menu = null ) : MenuItem Create new menu item model
createModel ( ) : Menu Create new menu model
delete ( Menu $menu ) : boolean Delete menu
deleteItem ( MenuItem $item ) : boolean Delete menu item
find ( string $id, array $with = [] ) : Menu Find a menu
insertItem ( MenuItem $item ) : MenuItem Insert menu item
update ( Menu $menu ) : Menu Update menu
updateItem ( MenuItem $item ) : MenuItem Update menu item

Private Methods

Method Description
getWithKey ( array $with = [] ) : string Get sub key by relationship

Method Details

all() public method

Get all menu
public all ( string $siteKey, array $with = [] ) : Menu[]
$siteKey string site key
$with array relation
return Xpressengine\Menu\Models\Menu[]

createItemModel() public method

Create new menu item model
public createItemModel ( Menu $menu = null ) : MenuItem
$menu Xpressengine\Menu\Models\Menu menu instance
return Xpressengine\Menu\Models\MenuItem

createModel() public method

Create new menu model
public createModel ( ) : Menu
return Xpressengine\Menu\Models\Menu

delete() public method

Delete menu
public delete ( Menu $menu ) : boolean
$menu Xpressengine\Menu\Models\Menu menu instance
return boolean

deleteItem() public method

Delete menu item
public deleteItem ( MenuItem $item ) : boolean
$item Xpressengine\Menu\Models\MenuItem menu item instance
return boolean

find() public method

Find a menu
public find ( string $id, array $with = [] ) : Menu
$id string menu identifier
$with array relation
return Xpressengine\Menu\Models\Menu

insertItem() public method

Insert menu item
public insertItem ( MenuItem $item ) : MenuItem
$item Xpressengine\Menu\Models\MenuItem menu item instance
return Xpressengine\Menu\Models\MenuItem

update() public method

Update menu
public update ( Menu $menu ) : Menu
$menu Xpressengine\Menu\Models\Menu menu instance
return Xpressengine\Menu\Models\Menu

updateItem() public method

Update menu item
public updateItem ( MenuItem $item ) : MenuItem
$item Xpressengine\Menu\Models\MenuItem menu item instance
return Xpressengine\Menu\Models\MenuItem

Property Details

$bag protected_oe property

Data bag
protected array $bag
return array