/home/techb158/immovalet.com/platform/core/base/src/Supports
Edit: /home/techb158/immovalet.com/platform/core/base/src/Supports/Assets.php (2364B)
config = $config->get('core.base.assets');
$this->scripts = $this->config['scripts'];
$this->styles = $this->config['styles'];
}
/**
* @param array $config
*/
public function setConfig(array $config)
{
$this->config = $config;
}
/**
* Get all admin themes
*
* @return array
*/
public function getThemes(): array
{
$themeFolder = '/vendor/core/core/base/css/themes';
$themes = ['default' => $themeFolder . '/default.css'];
if (!File::isDirectory(public_path($themeFolder))) {
return $themes;
}
$files = File::files(public_path($themeFolder));
if (empty($files)) {
return $themes;
}
foreach ($files as $file) {
$name = $themeFolder . '/' . basename($file);
if (!Str::contains($file, '.css.map')) {
$themes[basename($file, '.css')] = $name;
}
}
if (empty($themes)) {
$themes['default'] = $themeFolder . '/default.css';
}
return $themes;
}
/**
* @deprecated since v5.13
* @return array
*/
public function getAdminLocales(): array
{
return Language::getAvailableLocales();
}
/**
* @param array $lastStyles
* @return string
* @throws Throwable
*/
public function renderHeader($lastStyles = [])
{
do_action(BASE_ACTION_ENQUEUE_SCRIPTS);
return parent::renderHeader($lastStyles);
}
/**
* @return string
* @throws Throwable
*/
public function renderFooter()
{
$bodyScripts = $this->getScripts(self::ASSETS_SCRIPT_POSITION_FOOTER);
return view('assets::footer', compact('bodyScripts'))->render();
}
}