PHP Class Xpressengine\Menu\Repositories\EloquentRepository

Author: XE Developers ([email protected])
Inheritance: implements Xpressengine\Menu\MenuRepository
Datei anzeigen Open project: xpressengine/xpressengine

Protected Properties

Property Type Description
$keygen Xpressengine\Keygen\Keygen Keygen instance
$model string Model class

Public Methods

Method Description
__construct ( Keygen $keygen ) EloquentRepository 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 menu
findItem ( string $id, array $with = [] ) : MenuItem Find a menu item
getModel ( ) : string Get menu model
insert ( Menu $menu ) : Menu Insert menu
insertItem ( MenuItem $item ) : MenuItem Insert menu item
setModel ( string $model ) : void Set menu model
update ( Menu $menu ) : Menu Update menu
updateItem ( MenuItem $item ) : MenuItem Update menu item

Protected Methods

Method Description
generateNewId ( ) : string Generate new key

Method Details

__construct() public method

EloquentRepository constructor.
public __construct ( Keygen $keygen )
$keygen Xpressengine\Keygen\Keygen Keygen 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 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

generateNewId() protected method

Generate new key
protected generateNewId ( ) : string
return string

getModel() public method

Get menu model
public getModel ( ) : string
return string

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

setModel() public method

Set menu model
public setModel ( string $model ) : void
$model string model class
return void

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

$keygen protected_oe property

Keygen instance
protected Keygen,Xpressengine\Keygen $keygen
return Xpressengine\Keygen\Keygen

$model protected_oe property

Model class
protected string $model
return string