File: D:/HostingSpaces/SBogers10/liempde.ehbo.today/app/KommaApp/Kms/Core/Sections/KmsSectionTab.php
<?php //namespace App\KommaApp\Kms\Core\Sections;
//
//use Illuminate\Support\MessageBag;
//
///**
// * Class KmsSectionTab
// * @package App\KommaApp\Kms\Core\Sections
// *
// * @deprecated Don't use anymore. Use SectionTab class instead
// */
//class KmsSectionTab implements SectionTabInterface
//{
//
// protected $name;
// protected $slug;
//
// protected $items = [];
// protected $subTabs = [];
//
// public function __construct($name, $slug)
// {
// $this->name = $name;
// $this->slug = $slug;
// }
//
// public function getName()
// {
// return $this->name;
// }
//
// public function getSlug()
// {
// return $this->slug;
// }
//
// public function addItem(&$item, $subTabSlug = null, $subSubTabSlug = null)
// {
// if ($subSubTabSlug) {
// $tab = $this->getOrCreateSubTab($subTabSlug);
//
// $subTab = $tab->getOrCreateSubTab($subSubTabSlug);
// $subTab->addItem($item, $subTabSlug);
// return $item;
// }
// if ($subTabSlug) {
// $tab = $this->getOrCreateSubTab($subTabSlug);
// $tab->addItem($item, $subTabSlug);
// return $item;
// }
//
// return $this->items[] = $item;
// }
//
// public function getItems()
// {
// $items = [];
// foreach ($this->items as $item) {
// if ($item->checkIfUserIsEligible(\Auth::user()))
// $items[] = $item;
// }
// return $items;
// }
//
// public function getTabs()
// {
// return $this->subTabs;
// }
//
// public function hasTabs()
// {
// return (count($this->subTabs) > 0);
// }
//
// public function hasErrors(MessageBag $errors)
// {
// // Check if items are in message bag
// foreach ($this->getItems() as $item) {
// if ($errors->get($item->getKey())) return true;
// }
//
// //Check if items in sub tabs are in message bag
// foreach ($this->subTabs as $subTab) {
// foreach ($subTab->getItems() as $subItem) {
// if ($errors->get($subItem->getKey())) return true;
// }
// }
//
// return false;
// }
//
// protected function getOrCreateSubTab($name)
// {
// if (!$tab = $this->getSubTabBySlug($name)) {
// return $this->subTabs[] = new KmsSectionSubTab($name, $name);
// }
//
// return $tab;
// }
//
// protected function getSubTabBySlug($slug)
// {
// foreach ($this->subTabs as $tab) {
// if ($tab->getSlug() == $slug) return $tab;
// }
// return null;
// }
//
// public function getGroup()
// {
//
// }
//}