HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/ASmits/kemi.nl/app/KommaApp/Shop/Bridges/SIdeBarShopMenuComposerBridge.php
<?php
/**
 * Created by PhpStorm.
 * User: julesgraus
 * Date: 25/01/2018
 * Time: 09:17
 */

namespace App\KommaApp\Shop\Bridges;


use App\KommaApp\Sites\Models\Site;

class SideBarShopMenuComposerBridge
{
    /**
     * Returns an array of Shop Specific Menu bar items.
     *
     * @param string $currentSectionSlug
     * @param Site $site
     * @return array
     */
    public static function get(string $currentSectionSlug):array
    {
        $items = [];

        $items[] = [
            'name' => ucfirst(__('shop/products.products')),
            'url' => route('products.index'),
            'active' => ('products' == $currentSectionSlug)
        ];

        $items[] = [
            'name' => ucfirst(__('shop/products.product_groups')),
            'url' => route('productgroups.index'),
            'active' => ('productgroups' == $currentSectionSlug)
        ];

        $items[] = [
            'name' => ucfirst(__('shop/products.product_composites')),
            'url' => route('productcomposites.index'),
            'active' => ('productcomposites' == $currentSectionSlug)
        ];

        $items[] = [
            'name' => ucfirst(__('shop/categories.categories')),
            'url' => route('categories.index'),
            'active' => ('categories' == $currentSectionSlug)
        ];

        //TODO We add this functionality when we've made the section user friendly. Now it isn't
//        $items[] = [
//            'name' => ucfirst(__('shop/discounts.discounts')),
//            'url' => route('discounts.index', []),
//            'active' => ('discounts' == $currentSectionSlug)
//        ];

        return $items;
    }
}