File: D:/HostingSpaces/marisrental/boldt.tech/app/Komma/Kms/Core/Sections/SectionTabGroups.php
<?php
namespace App\Komma\Kms\Core\Sections;
/**
* Class SectionTabGroups
* @package App\Komma\Kms\Core\Sections
*
* Defines tab groups.
*/
abstract class SectionTabGroups
{
const None = '';
const General = 'general';
const Languages = 'languages';
/**
* Check if the passed group is really a group that is defined as a constant in this class.
*
* @param string $group
* @param bool $strict If true it will only consider a role as valid if it is an int. If it for example is a numeric string it won't consider it valid
* @return bool Returns true if the group is a valid one, false otherwise
*/
static function isValidGroup(string $group, $strict = false) {
return in_array($group, self::getAllGroups(), $strict);
}
/**
* Returns an array containing integers representing the defined groups.
*
* @return string[]
*/
private static function getAllGroups()
{
$thisClassAsReflectionClass = new \ReflectionClass(__CLASS__);
return $thisClassAsReflectionClass->getConstants();
}
}