From 6b0a0c95f3fff3dd6522b21217d4a143f44a7cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jir=CC=8Ci=CC=81=20Svoboda?= Date: Wed, 17 Jun 2015 16:40:17 +0200 Subject: [PATCH] main fix --- Metronic.php | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/Metronic.php b/Metronic.php index edf4ca4..7565447 100644 --- a/Metronic.php +++ b/Metronic.php @@ -1,5 +1,4 @@ sidebarOption && self::SIDEBAR_MENU_HOVER === $this->sidebarMenu) { throw new InvalidConfigException('Hover Sidebar Menu is not compatible with Fixed Sidebar Mode. Select Default Sidebar Mode Instead.'); } + + if (!$this->resources) + { + throw new InvalidConfigException('You have to specify resources locations to be able to create symbolic links. Specify "admin" and "global" theme folder locations.'); + } + + if (!is_link(self::ASSETS_LINK)) + { + symlink($this->resources, self::ASSETS_LINK); + } } public function parseAssetsParams(&$string) @@ -272,5 +291,4 @@ public static function registerThemeAsset($view) { return static::$assetsBundle = ThemeAsset::register($view); } - -} +} \ No newline at end of file