PHP Trait App\Traits\MenuHandlerTrait

Datei anzeigen Open project: sroutier/laravel-5.1-enterprise-starter-kit

Public Properties

Property Type Description
$app Illuminate\Foundation\Application Laravel application
$menuRepository App\Repositories\MenuRepository

Protected Properties

Property Type Description
$auth Guard The Guard implementation.

Public Methods

Method Description
__construct ( Illuminate\Foundation\Application $app ) : void Create a new instance.
generateUrl ( Menu $menu ) : mixed | null | string
getCurrentUrl ( ) : null
getLeafMenuItem ( null $leaf = null ) : mixed | null
getMenuBranch ( $leaf = null )
getMenuItem ( $input ) : mixed
getVariables ( Menu $menu, array $variables = [] ) : array
renderBreadcrumbTrail ( null $leaf = null, string $topNode = 'root', boolean $includeTopNode = false ) : Illuminate\View\View
renderBreadcrumbTrailItem ( Menu $item, array $variables = [] ) : mixed | string
renderMenu ( string $topNode = 'root', boolean $includeTopNode = false ) : Illuminate\View\View Builds a representation of the menu for the defined framework and return it starting at the $topNode.
renderMenuItem ( Menu $item, array $variables = [], $menuBranch = [] ) : string
replaceVars ( $string, $vars ) : mixed

Method Details

__construct() public method

Create a new instance.
public __construct ( Illuminate\Foundation\Application $app ) : void
$app Illuminate\Foundation\Application
return void

generateUrl() public method

public generateUrl ( Menu $menu ) : mixed | null | string
$menu app\models\Menu
return mixed | null | string

getCurrentUrl() public method

public getCurrentUrl ( ) : null
return null

getLeafMenuItem() public method

public getLeafMenuItem ( null $leaf = null ) : mixed | null
$leaf null
return mixed | null

getMenuBranch() public method

public getMenuBranch ( $leaf = null )

getMenuItem() public method

public getMenuItem ( $input ) : mixed
$input
return mixed

getVariables() public method

public getVariables ( Menu $menu, array $variables = [] ) : array
$menu app\models\Menu
$variables array
return array

renderBreadcrumbTrail() public method

public renderBreadcrumbTrail ( null $leaf = null, string $topNode = 'root', boolean $includeTopNode = false ) : Illuminate\View\View
$leaf null
$topNode string
$includeTopNode boolean
return Illuminate\View\View

renderBreadcrumbTrailItem() public method

public renderBreadcrumbTrailItem ( Menu $item, array $variables = [] ) : mixed | string
$item app\models\Menu
$variables array
return mixed | string

renderMenu() public method

Builds a representation of the menu for the defined framework and return it starting at the $topNode.
public renderMenu ( string $topNode = 'root', boolean $includeTopNode = false ) : Illuminate\View\View
$topNode string can be an instance of a Menu object, it's id or name. It is set to 'root' by default.
$includeTopNode boolean indicates whether to include the root node itself or not. It's default value is 'false'.
return Illuminate\View\View

renderMenuItem() public method

public renderMenuItem ( Menu $item, array $variables = [], $menuBranch = [] ) : string
$item app\models\Menu
$variables array
return string

replaceVars() public method

public replaceVars ( $string, $vars ) : mixed
$string
$vars
return mixed

Property Details

$app public_oe property

Laravel application
public Application,Illuminate\Foundation $app
return Illuminate\Foundation\Application

$auth protected_oe property

The Guard implementation.
protected Guard $auth
return Guard

$menuRepository public_oe property

public MenuRepository,App\Repositories $menuRepository
return App\Repositories\MenuRepository