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/egovers/edwingovers.nl/app/KommaApp/Kms/Core/Sections/KmsSectionTabsCollection.php
<?php //namespace App\KommaApp\Kms\Core\Sections;
///**
// *
// *
// * @author      Komma <info@komma.pro>
// * @copyright   (c) 2012-2016, Komma
// */
//class KmsSectionTabsCollection implements SectionTabsCollectionInterface
//{
//    protected $tabs = [];
//
//    public function getOrCreateTab(string $name)
//    {
//        if (!$tab = $this->getTabBySlug($name)) {
//            return $this->tabs[] = new SectionTab($name, str_slug($name));
//        }
//        return $tab;
//    }
//
//    public function addItem(&$item, string $tabSlug, $subTabSlug = null, $subSubTabSlug = null)
//    {
//        if ($tabSlug == null) {
//            $tabSlug = 'lang_get:kms/global.general';
//        }
//        //if the tab slug starts with lang_get change this
//        if (!is_string($tabSlug)) $tabSlug = 'lang_get:kms/global.general';
//        if (preg_match('/lang_get:(.*)/i', $tabSlug, $match)) {
//            $tabSlug = \Lang::get($match[1]);
//        }
//        $tab = $this->getOrCreateTab($tabSlug);
//        $tab->addItem($item, $subTabSlug, $subSubTabSlug);
//    }
//
//    public function getTabs()
//    {
//        return $this->tabs;
//    }
//
//    public function clearTabs()
//    {
//        $this->tabs = [];
//    }
//
//    protected function getTabBySlug($slug)
//    {
//        foreach ($this->tabs as $tab) {
//            if ($tab->getSlug() == str_slug($slug)) return $tab;
//        }
//        return null;
//    }
//
//}