PHP Trait App\Traits\MenuHandlerTrait

Afficher le fichier Open project: sroutier/laravel-5.1-enterprise-starter-kit

Méthodes publiques

Свойство Type Description
$app Illuminate\Foundation\Application Laravel application
$menuRepository app\repositories\MenuRepository

Protected Properties

Свойство Type Description
$auth Guard The Guard implementation.

Méthodes publiques

Méthode 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 méthode

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

generateUrl() public méthode

public generateUrl ( Menu $menu ) : mixed | null | string
$menu app\models\Menu
Résultat mixed | null | string

getCurrentUrl() public méthode

public getCurrentUrl ( ) : null
Résultat null

getLeafMenuItem() public méthode

public getLeafMenuItem ( null $leaf = null ) : mixed | null
$leaf null
Résultat mixed | null

getMenuBranch() public méthode

public getMenuBranch ( $leaf = null )

getMenuItem() public méthode

public getMenuItem ( $input ) : mixed
$input
Résultat mixed

getVariables() public méthode

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

renderBreadcrumbTrail() public méthode

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

renderBreadcrumbTrailItem() public méthode

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

renderMenu() public méthode

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'.
Résultat Illuminate\View\View

renderMenuItem() public méthode

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

replaceVars() public méthode

public replaceVars ( $string, $vars ) : mixed
$string
$vars
Résultat mixed

Property Details

$app public_oe property

Laravel application
public Application,Illuminate\Foundation $app
Résultat Illuminate\Foundation\Application

$auth protected_oe property

The Guard implementation.
protected Guard $auth
Résultat Guard

$menuRepository public_oe property

public MenuRepository,App\Repositories $menuRepository
Résultat app\repositories\MenuRepository