PHP Class Xpressengine\Menu\Repositories\AbstractDecorator

Author: XE Developers ([email protected])
Inheritance: implements Xpressengine\Menu\MenuRepository
ファイルを表示 Open project: xpressengine/xpressengine Class Usage Examples

Protected Properties

Property Type Description
$repo Xpressengine\Menu\MenuRepository MenuRepository instance

Public Methods

Method Description
__construct ( Xpressengine\Menu\MenuRepository $repo ) AbstractDecorator constructor.
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
fetchInItem ( array $ids, array $with = [] ) : MenuItem[] Get menu items by identifier list
find ( string $id, array $with = [] ) : Menu Find a menu
findItem ( string $id, array $with = [] ) : MenuItem Find a menu item
insert ( Menu $menu ) : Menu Insert menu
insertItem ( MenuItem $item ) : MenuItem Insert menu item
update ( Menu $menu ) : Menu Update menu
updateItem ( MenuItem $item ) : MenuItem Update menu item

Method Details

__construct() public method

AbstractDecorator constructor.
public __construct ( Xpressengine\Menu\MenuRepository $repo )
$repo Xpressengine\Menu\MenuRepository MenuRepository instance

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

fetchInItem() public method

Get menu items by identifier list
public fetchInItem ( array $ids, array $with = [] ) : MenuItem[]
$ids array menu item identifier
$with array relation
return Xpressengine\Menu\Models\MenuItem[]

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

findItem() public method

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

insert() public method

Insert menu
public insert ( Menu $menu ) : Menu
$menu Xpressengine\Menu\Models\Menu menu instance
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

$repo protected_oe property

MenuRepository instance
protected MenuRepository,Xpressengine\Menu $repo
return Xpressengine\Menu\MenuRepository