/home/sharedstore/public_html/prestashop.sharedstore.ma/src/Core/Addon/Theme
Edit: /home/sharedstore/public_html/prestashop.sharedstore.ma/src/Core/Addon/Theme/ThemeProvider.php (1955B)
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
namespace PrestaShop\PrestaShop\Core\Addon\Theme;
/**
* Class ThemeProvider
*/
final class ThemeProvider implements ThemeProviderInterface
{
/**
* @var ThemeRepository
*/
private $themeRepository;
/**
* @var Theme
*/
private $theme;
/**
* @param ThemeRepository $themeRepository
* @param Theme $theme
*/
public function __construct(ThemeRepository $themeRepository, Theme $theme)
{
$this->themeRepository = $themeRepository;
$this->theme = $theme;
}
/**
* {@inheritdoc}
*/
public function getCurrentlyUsedTheme()
{
return $this->theme;
}
/**
* {@inheritdoc}
*/
public function getNotUsedThemes()
{
return $this->themeRepository->getListExcluding([
$this->getCurrentlyUsedTheme()->getName(),
]);
}
}