Extension Install
This commit is contained in:
28
extensions/Others/NavbarManager/Helpers/NavbarHelper.php
Normal file
28
extensions/Others/NavbarManager/Helpers/NavbarHelper.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Paymenter\Extensions\Others\NavbarManager\Helpers;
|
||||
|
||||
use Paymenter\Extensions\Others\NavbarManager\View\Components\NavigationLinks;
|
||||
|
||||
class NavbarHelper
|
||||
{
|
||||
/**
|
||||
* Get navbar links for specified type
|
||||
*/
|
||||
public static function getLinks($type = 'primary')
|
||||
{
|
||||
$component = new NavigationLinks($type);
|
||||
return $component->links;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render navbar links component
|
||||
*/
|
||||
public static function render($type = 'primary', $class = '')
|
||||
{
|
||||
return view('navbar-manager::components.navigation-links', [
|
||||
'links' => self::getLinks($type),
|
||||
'class' => $class
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user