示例#1
0
文件: Slot.php 项目: Umz/ImpressPages
 /**
  * @desc Generate menu with custom ul ID and class
  * @author Allan Laal <*****@*****.**>
  * @param array $params
  * @return string
  */
 public static function menu_80($params)
 {
     $data = array('items' => null, 'depth' => 1, 'active' => 'active', 'crumb' => 'crumb', 'disabled' => 'disabled', 'parent' => 'parent', 'children' => 'children', 'view' => 'Ip/Internal/Config/view/menu.php');
     if (is_string($params)) {
         $params = array('items' => $params);
     }
     if (!empty($params[0]) && is_object($params[0]) && $params[0] instanceof \Ip\Menu\Item) {
         $params = array('items' => $params);
     }
     $data = array_merge($data, $params);
     // pass params to View along with other data
     if (isset($params['items']) && is_string($params['items'])) {
         $data['items'] = \Ip\Menu\Helper::getMenuItems($params['items']);
     }
     if (empty($data['attributes']) || !is_array($data['attributes'])) {
         $data['attributes'] = array();
     }
     //generate attributes str
     if (empty($data['attributes']['class'])) {
         $data['attributes']['class'] = '';
     }
     $data['attributes']['class'] = 'level' . $data['depth'] . ' ' . $data['attributes']['class'];
     $data['attributesStr'] = join(' ', array_map(function ($sKey) use($data) {
         if (is_bool($data['attributes'][$sKey])) {
             return $data['attributes'][$sKey] ? $sKey : '';
         }
         return $sKey . '="' . $data['attributes'][$sKey] . '"';
     }, array_keys($data['attributes'])));
     $view = ipView($data['view'], $data);
     return $view->render();
 }
示例#2
0
 public function index()
 {
     $model = Model::instance();
     ipAddJs('Ip/Internal/Grid/assets/grid.js');
     ipAddJs('Ip/Internal/Grid/assets/gridInit.js');
     ipAddJs('Ip/Internal/Grid/assets/subgridField.js');
     $notes = array();
     if (isset($_SESSION['Ip']['notes']) && is_array($_SESSION['Ip']['notes'])) {
         $notes = $_SESSION['Ip']['notes'];
     }
     unset($_SESSION['Ip']['notes']);
     $enableUpdate = !defined('MULTISITE_WEBSITES_DIR');
     // Disable update in MultiSite installation.
     $trash = array('size' => \Ip\Internal\Pages\Service::trashSize());
     $data = array('notes' => $notes, 'version' => \Ip\ServiceLocator::storage()->get('Ip', 'version'), 'changedUrl' => $model->getOldUrl() != $model->getNewUrl(), 'oldUrl' => $model->getOldUrl(), 'newUrl' => $model->getNewUrl(), 'migrationsAvailable' => \Ip\Internal\Update\Service::migrationsAvailable(), 'migrationsUrl' => ipActionUrl(array('pa' => 'Update')), 'recoveryPageForm' => \Ip\Internal\System\Helper::recoveryPageForm(), 'emptyPageForm' => \Ip\Internal\System\Helper::emptyPageForm(), 'trash' => $trash);
     $content = ipView('view/index.php', $data)->render();
     if ($enableUpdate) {
         ipAddJs('Ip/Internal/System/assets/update.js');
     }
     if ($trash['size'] > 0) {
         ipAddJs('Ip/Internal/Core/assets/js/angular.js');
         ipAddJs('Ip/Internal/System/assets/trash.js');
     }
     ipAddJs('Ip/Internal/System/assets/migrations.js');
     ipAddJs('assets/cache.js');
     return $content;
 }
 public static function ipHead($head)
 {
     $vars = array('siteName' => ipGetOptionLang('Config.websiteTitle'));
     $defaultTitle = ipGetOptionLang('FacebookTags.defaultTitle');
     if ($defaultTitle) {
         $vars['title'] = $defaultTitle;
     }
     $defaultImage = array(ipGetOptionLang('FacebookTags.defaultImage'));
     if ($defaultImage) {
         $vars['images'] = $defaultImage;
     }
     $adminId = ipGetOptionLang('FacebookTags.adminId');
     if ($adminId) {
         $vars['adminId'] = $adminId;
     }
     $pageTags = Service::facebookTags();
     if (!empty($pageTags['images'])) {
         foreach ($pageTags['images'] as &$image) {
             $image = ipFileUrl('file/repository/' . $image);
         }
     } else {
         unset($pageTags['images']);
     }
     $vars = array_merge($vars, $pageTags);
     $tags = ipView('view/tags.php', $vars)->render();
     $head .= $tags;
     return $head;
 }
示例#4
0
 public static function ipBlockContent($content, $data)
 {
     if ($data['blockName'] == "main") {
         $pagePassword = Service::pagePassword();
         $pageId = Model::getPageId();
         if ($pagePassword && !ipAdminId()) {
             if (isset($_SESSION['pagePassword']) && is_array($_SESSION['pagePassword']) && in_array($pageId, $_SESSION['pagePassword'])) {
                 return $content;
             }
             $data['form'] = Helper::createForm();
             $postPassword = ipRequest()->getPost('pagePassword');
             if ($postPassword && $postPassword == $pagePassword) {
                 if (isset($_SESSION['pagePassword']) && is_array($_SESSION['pagePassword'])) {
                     $_SESSION['pagePassword'][] = $pageId;
                 } else {
                     $_SESSION['pagePassword'] = array();
                     $_SESSION['pagePassword'][] = $pageId;
                 }
                 return $content;
             } elseif ($postPassword) {
                 $data['error'] = __('Incorrect password', 'PagePassword', false);
             }
             return ipView('view/password.php', $data)->render();
         }
     }
     return $content;
 }
示例#5
0
 public function index()
 {
     ipAddJs('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.js');
     ipAddCss('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.css');
     ipAddJs('Ip/Internal/Core/assets/js/easyXDM/easyXDM.min.js');
     ipAddJs('Ip/Internal/Design/assets/options.js');
     ipAddJs('Ip/Internal/Design/assets/market.js');
     ipAddJs('Ip/Internal/Design/assets/design.js');
     ipAddJs('Ip/Internal/Design/assets/pluginInstall.js');
     ipAddJs('Ip/Internal/System/assets/market.js');
     $model = Model::instance();
     $themes = $model->getAvailableThemes();
     $model = Model::instance();
     $theme = $model->getTheme(ipConfig()->theme());
     $options = $theme->getOptionsAsArray();
     $themePlugins = $model->getThemePlugins();
     $installedPlugins = \Ip\Internal\Plugins\Service::getActivePluginNames();
     $notInstalledPlugins = array();
     //filter plugins that are already installed
     foreach ($themePlugins as $plugin) {
         if (!empty($plugin['name']) && (!in_array($plugin['name'], $installedPlugins) || !is_dir(ipFile('Plugin/' . $plugin['name'])))) {
             $notInstalledPlugins[] = $plugin;
         }
     }
     if (isset($_SESSION['module']['design']['pluginNote'])) {
         $pluginNote = $_SESSION['module']['design']['pluginNote'];
         unset($_SESSION['module']['design']['pluginNote']);
     } else {
         $pluginNote = '';
     }
     $data = array('pluginNote' => $pluginNote, 'theme' => $model->getTheme(ipConfig()->theme()), 'plugins' => $notInstalledPlugins, 'availableThemes' => $themes, 'marketUrl' => $model->getMarketUrl(), 'showConfiguration' => !empty($options), 'contentManagementUrl' => ipConfig()->baseUrl() . '?aa=Content.index', 'contentManagementText' => __('Manage content', 'Ip-admin', false));
     $contentView = ipView('view/layout.php', $data);
     ipResponse()->setLayoutVariable('removeAdminContentWrapper', true);
     return $contentView->render();
 }
示例#6
0
 public function getImageContainerHtml()
 {
     $html = ipView('view/imageContainer.php', array())->render();
     $result = array("status" => "success", "html" => $html);
     // TODO JsonRpc
     return new \Ip\Response\Json($result);
 }
示例#7
0
 /**
  * Render field
  *
  * @param string $doctype
  * @param $environment
  * @return string
  */
 public function render($doctype, $environment)
 {
     $data = array('attributesStr' => $this->getAttributesStr($doctype), 'classes' => implode(' ', $this->getClasses()), 'inputName' => $this->getName(), 'fileLimit' => $this->fileLimit, 'value' => $this->getValue(), 'preview' => $this->preview, 'secure' => $this->secure, 'path' => $this->path, 'filter' => $this->filter, 'filterExtensions' => $this->filterExtensions);
     $viewFile = 'adminView/repositoryFile.php';
     $view = ipView($viewFile, $data);
     return $view->render();
 }
示例#8
0
 public static function renderLayout($view, $data = array())
 {
     $content = ipView($view, $data)->render();
     $response = new LayoutResponse();
     $response->setContent($content);
     return $response;
 }
示例#9
0
 /**
  * Execute response and return html response
  *
  * @return \Ip\Response
  */
 public function execute()
 {
     ipContent()->setBlockContent('main', $this->content);
     $layout = $this->getLayout();
     if ($layout[0] == '/' || $layout[1] == ':') {
         // Check if absolute path: '/' for unix, 'C:' for windows
         $viewFile = $layout;
         if (!is_file($viewFile)) {
             $viewFile = ipThemeFile('main.php');
         }
     } elseif (strpos($layout, '/') !== false) {
         //impresspages path. Eg. Ip/Internal/xxx.php
         $viewFile = $layout;
         if (!is_file(ipFile($viewFile))) {
             $viewFile = ipThemeFile('main.php');
         }
     } else {
         //layout file. Like main.php
         $viewFile = ipThemeFile($layout);
         if (!is_file($viewFile)) {
             $viewFile = ipThemeFile('main.php');
         }
     }
     $content = ipView($viewFile, $this->getLayoutVariables())->render();
     $response = new \Ip\Response($content, $this->getHeaders(), $this->getStatusCode());
     return $response;
 }
示例#10
0
 public static function ipBeforeController()
 {
     $request = \Ip\ServiceLocator::request();
     $sessionLifetime = ini_get('session.gc_maxlifetime');
     if (!$sessionLifetime) {
         $sessionLifetime = 120;
     }
     if ($sessionLifetime > 30) {
         $sessionLifetime = $sessionLifetime - 20;
     }
     ipAddJsVariable('ipSessionRefresh', $sessionLifetime);
     if (ipConfig()->isDebugMode()) {
         ipAddJs('Ip/Internal/Core/assets/ipCore/jquery.js', null, 10);
         // default, global jQuery
         ipAddJs('Ip/Internal/Core/assets/ipCore/console.log.js', null, 10);
         ipAddJs('Ip/Internal/Core/assets/ipCore/functions.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/jquery.tools.form.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/color.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/file.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/richtext.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/repositoryFile.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form/url.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/form.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/validator.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/widgets.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/ipCore.js');
     } else {
         ipAddJs('Ip/Internal/Core/assets/ipCore.min.js', null, 10);
     }
     //Form init
     $validatorTranslations = array('Ip-admin' => static::validatorLocalizationData('Ip-admin'), ipContent()->getCurrentLanguage()->getCode() => static::validatorLocalizationData('Ip'));
     ipAddJsVariable('ipValidatorTranslations', $validatorTranslations);
     if (ipAdminId() || \Ip\Internal\Admin\Model::isLoginPage() || \Ip\Internal\Admin\Model::isPasswordResetPage()) {
         if (ipConfig()->isDebugMode()) {
             ipAddJs('Ip/Internal/Core/assets/admin/managementMode.js');
             ipAddJs('Ip/Internal/Core/assets/admin/functions.js');
             ipAddJs('Ip/Internal/Core/assets/admin/validator.js');
             ipAddJs('Ip/Internal/Core/assets/admin/bootstrap/bootstrap.js');
             ipAddJs('Ip/Internal/Core/assets/admin/bootstrap-switch/bootstrap-switch.js');
         } else {
             ipAddJs('Ip/Internal/Core/assets/admin.min.js', null, 10);
         }
         ipAddJs('Ip/Internal/Core/assets/tinymce/pastePreprocess.js');
         ipAddJs('Ip/Internal/Core/assets/tinymce/default.js');
     }
     if (ipAdminId()) {
         ipAddJs('Ip/Internal/Core/assets/js/tiny_mce/jquery.tinymce.min.js');
         ipAddJs('Ip/Internal/Core/assets/js/tiny_mce/tinymce.min.js');
         ipAddJsVariable('ipBrowseLinkModalTemplate', ipView('view/browseLinkModal.php')->render());
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/plupload.full.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/plupload.browserplus.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/plupload.gears.js');
         ipAddJs('Ip/Internal/Core/assets/ipCore/plupload/jquery.plupload.queue/jquery.plupload.queue.js');
         if (is_file(ipThemeFile('setup/admin.js'))) {
             ipAddJs(ipThemeUrl('setup/admin.js'));
         }
         ipAddCss('Ip/Internal/Core/assets/admin/admin.css');
     }
 }
示例#11
0
 public static function veryEmail_10($vcode)
 {
     $fcode = substr($vcode, 0, strpos($vcode, '-!'));
     $mail = substr($vcode, strpos($vcode, '-!') + 2, 250);
     ipDb()->update('comments', array('approved' => '1'), array('verification_code' => $fcode, 'email' => $mail));
     $data = array('message' => __('Your email address has been verified. Thank you.', 'Comments'));
     return ipView('view/mailVerified.php', $data)->render();
 }
 public function testSessions()
 {
     if (!empty($_SESSION['websiteId'])) {
         return new \Ip\Response\Json(array('status' => 'success'));
     }
     $answer = array('html' => ipView('view/sessionsDontWork.php')->render());
     return new \Ip\Response\Json($answer);
 }
示例#13
0
 public static function AddThis($widget = false)
 {
     if ($widget) {
         $layout = ipGetOption('AddThis.widgetLayout');
     } else {
         $layout = ipGetOption('AddThis.slotLayout');
     }
     return ipView('view/' . $layout . '.php')->render();
 }
示例#14
0
 /**
  * @ipSubmenu Table types
  */
 public function index()
 {
     ipAddJs('Ip/Internal/Core/assets/js/angular.js');
     ipAddJs('Plugin/DataTableWidget/assets/tableTypesController.js');
     $data = array('createForm' => AdminFormHelper::createForm(true), 'updateForm' => AdminFormHelper::updateForm(true), 'deleteForm' => AdminFormHelper::deleteForm());
     ipAddJsVariable('tableTypes', TableType::getAllAsArray());
     ipAddJsVariable('columnOptions', TableType::getColumnOptions());
     ipAddJsVariable('languages', ipContent()->getLanguages());
     return ipView('view/layout.php', $data)->render();
 }
示例#15
0
 public static function ipWidgetHtml($html, $data)
 {
     $classes = array();
     if (!in_array($data['name'], array('AsdBlogList', 'Columns', 'Divider', 'ipWidget-AsdBlogList')) && self::getThemeOption('wowAnimation', 'none') != 'none') {
         $classes[] = 'wow';
         $classes[] = self::getThemeOption('wowAnimation', 'none');
         return ipView('view/widgetWrapper.php', compact('classes', 'html'));
     }
     return $html;
 }
示例#16
0
 public function adminHtmlSnippet()
 {
     $form = new \Ip\Form();
     $form->setEnvironment(\Ip\Form::ENVIRONMENT_ADMIN);
     $form->addField(new \Ip\Form\Field\Text(array('name' => 'title', 'label' => __('Title', 'Portfolio'), 'value' => null)));
     $form->addField(new \Ip\Form\Field\RichText(array('name' => 'description', 'label' => __('Description', 'Portfolio'), 'value' => null)));
     $form->addField(new \Ip\Form\Field\RepositoryFile(array('name' => 'imagelink', 'label' => __('Image', 'Portfolio'), 'fileLimit' => 1, 'value' => empty($item['imagelink']) ? null : array($item['imagelink']))));
     $form->addField(new \Ip\Form\Field\Url(array('name' => 'pagelink', 'label' => __('Page Url', 'Portfolio'), 'value' => null)));
     return ipView('snippet/edit.php', array('form' => $form))->render();
 }
示例#17
0
 public function pagePropertiesForm()
 {
     $pageId = ipRequest()->getQuery('pageId');
     if (!$pageId) {
         throw new \Ip\Exception("Missing required parameters");
     }
     $variables = array('form' => Helper::pagePropertiesForm($pageId));
     $layout = ipView('view/pageProperties.php', $variables)->render();
     $data = array('html' => $layout);
     return new \Ip\Response\Json($data);
 }
示例#18
0
文件: File.php 项目: Umz/ImpressPages
 /**
  * Render field
  *
  * @param string $doctype
  * @param $environment
  * @return string
  */
 public function render($doctype, $environment)
 {
     $data = array('attributesStr' => $this->getAttributesStr($doctype), 'classes' => implode(' ', $this->getClasses()), 'inputName' => $this->getName(), 'fileLimit' => $this->fileLimit);
     if ($environment == \Ip\Form::ENVIRONMENT_ADMIN) {
         $viewFile = 'adminView/file.php';
     } else {
         $viewFile = 'publicView/file.php';
     }
     $view = ipView($viewFile, $data);
     return $view->render();
 }
示例#19
0
 public function adminHtmlSnippet()
 {
     $form = new \Ip\Form();
     $form->addField(new \Ip\Form\Field\Number(array('label' => 'Size (px)', 'name' => 'size')));
     $form->addField(new \Ip\Form\Field\Color(array('label' => 'Color', 'name' => 'color')));
     $form->addField(new \Ip\Form\Field\Color(array('label' => 'Shadow color', 'name' => 'shadow_color')));
     $form->addField(new \Ip\Form\Field\Number(array('label' => 'shadow_offset_top', 'name' => 'shadow_offset_top')));
     $form->addField(new \Ip\Form\Field\Number(array('label' => 'shadow_offset_left', 'name' => 'shadow_offset_left')));
     $form->addField(new \Ip\Form\Field\Number(array('label' => 'shadow_spread', 'name' => 'shadow_spread')));
     $form->addField(new \Plugin\FontAwesomeIcons\FontAwesomeField(array('label' => 'Icon', 'name' => 'icon')));
     return ipView('snippet/modal.php', array('form' => $form->render()))->render();
 }
 public function index()
 {
     ipAddCss('assets/repositoryLayout.css');
     ipAddJs('assets/layout.js');
     $routeVariables = array('aa' => 'RepositoryManager.repository', 'disableAdminNavbar' => 1);
     //        ipResponse()->setLayoutVariable('repositoryUrl', ipActionUrl($routeVariables));
     //        ipResponse()->setLayout('Plugin/RepositoryManager/view/index.php');
     ////        ipSetLayout('view/index.php');
     //        return 'a';
     ipResponse()->setLayoutVariable('removeAdminContentWrapper', true);
     return ipView('view/index.php', array('repositoryUrl' => ipActionUrl($routeVariables)));
 }
示例#21
0
 public function index()
 {
     ipAddJs('Ip/Internal/Config/assets/config.js');
     ipAddCss('Ip/Internal/Config/assets/config.css');
     $form = Forms::getForm();
     $advancedForm = false;
     if (ipAdminPermission('Config advanced')) {
         $advancedForm = Forms::getAdvancedForm();
     }
     $data = array('form' => $form, 'advancedForm' => $advancedForm);
     return ipView('view/configWindow.php', $data)->render();
 }
示例#22
0
 public function preview()
 {
     $id = ipRequest()->getQuery('id');
     if (!$id) {
         throw new \Ip\Exception('Email not found');
     }
     $email = Db::getEmail($id);
     $viewData = array('email' => $email);
     $content = ipView('view/preview.php', $viewData);
     $response = new \Ip\Response($content);
     return $response;
 }
示例#23
0
 public function adminHtmlSnippet()
 {
     $maxLevel = (int) ipGetOption('Content.widgetHeadingMaxLevel', 6);
     if ($maxLevel > 6) {
         $maxLevel = 6;
     }
     if ($maxLevel < 1) {
         $maxLevel = 1;
     }
     $variables = array('optionsForm' => $this->optionsForm());
     $variables2 = array('maxLevel' => $maxLevel);
     return ipView('snippet/options.php', $variables)->render() . "\n" . ipView('snippet/controls.php', $variables2)->render();
 }
 /**
  * Index action adds an item to administration menu
  */
 public function index()
 {
     ipAddJs('view/assets/js/vendor/angular.js', 1);
     ipAddJs('view/assets/js/vendor/angular-animate.min.js');
     ipAddJs('view/assets/js/vendor/angular-sanitize.min.js');
     ipAddJs('view/assets/js/vendor/ngToast.min.js');
     ipAddJs('view/assets/js/Controllers/WidgetCtrl.js', 6);
     ipAddCss('view/assets/css/ngToast.min.css');
     $BasePath = ipConfig()->baseUrl();
     ipAddJsVariable('BASEPATH', $BasePath);
     $data = array();
     return ipView('view/main.php', $data)->render();
 }
示例#25
0
 public function index()
 {
     ipAddJs('Ip/Internal/Grid/assets/grid.js');
     ipAddJs('Ip/Internal/Grid/assets/gridInit.js');
     ipAddJs('Ip/Internal/Grid/assets/subgridField.js');
     $controllerClass = get_class($this);
     $controllerClassParts = explode('\\', $controllerClass);
     $aa = $controllerClassParts[count($controllerClassParts) - 2] . '.grid';
     $gateway = array('aa' => $aa);
     $variables = array('gateway' => ipActionurl($gateway));
     $content = ipView('Internal/Grid/view/placeholder.php', $variables)->render();
     return $content;
 }
示例#26
0
 /**
  * Go to /day to see the result
  * @return \Ip\View
  */
 public function day($day = null)
 {
     // Uncomment to include assets
     // ipAddJs('assets/application.js');
     // ipAddCss('assets/application.css');
     if (!$day) {
         $day = date('l');
     }
     $data = array('day' => $day);
     //change the layout if you like
     //ipSetLayout('home.php');
     return ipView('view/day.php', $data);
 }
示例#27
0
 public function render($view = null)
 {
     if ($this->totalPages < 1 && $this->currentPage == 1) {
         return null;
     }
     if (!$view) {
         $view = ipFile('Ip/Pagination/view/pagination.php');
     }
     $data = $this->options;
     $data['currentPage'] = $this->currentPage;
     $data['totalPages'] = $this->totalPages;
     $data['pages'] = $this->pages();
     return ipView($view, $data)->render();
 }
示例#28
0
 /**
  * WidgetSkeleton.js ask to provide widget management popup HTML. This controller does this.
  * @return \Ip\Response\Json
  * @throws \Ip\Exception\View
  */
 public function widgetPopupHtml()
 {
     $widgetId = ipRequest()->getQuery('widgetId');
     $widgetRecord = \Ip\Internal\Content\Model::getWidgetRecord($widgetId);
     $widgetData = $widgetRecord['data'];
     //create form prepopulated with current widget data
     $form = $this->managementForm($widgetData);
     //Render form and popup HTML
     $viewData = array('form' => $form);
     $popupHtml = ipView('view/editPopup.php', $viewData)->render();
     $data = array('popup' => $popupHtml);
     //Return rendered widget management popup HTML in JSON format
     return new \Ip\Response\Json($data);
 }
示例#29
0
 private static function getTwitterView($view)
 {
     $username = Model::getTwitterUsername();
     $widget_id = Model::getTwitterWidgetID();
     if ($username && $widget_id) {
         $data['username'] = $username;
         $data['widget_id'] = $widget_id;
         return ipView('view/' . $view . '.php', $data)->render();
     } else {
         if (ipIsManagementState()) {
             return ipView('view/error.php')->render();
         }
         return false;
     }
 }
示例#30
0
 public static function initManagement()
 {
     $widgets = Service::getAvailableWidgets();
     $snippets = array();
     foreach ($widgets as $widget) {
         $snippetHtml = $widget->adminHtmlSnippet();
         if ($snippetHtml != '') {
             $snippets[] = $snippetHtml;
         }
     }
     ipAddJsVariable('ipWidgetSnippets', $snippets);
     ipAddJsVariable('ipContentInit', Model::initManagementData());
     ipAddJs('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.js');
     ipAddCss('Ip/Internal/Core/assets/js/jquery-ui/jquery-ui.css');
     if (ipConfig()->isDebugMode()) {
         ipAddJs('Ip/Internal/Content/assets/management/ipContentManagementInit.js');
         ipAddJs('Ip/Internal/Content/assets/management/content.js');
         ipAddJs('Ip/Internal/Content/assets/management/jquery.ip.contentManagement.js');
         ipAddJs('Ip/Internal/Content/assets/management/jquery.ip.widgetbutton.js');
         ipAddJs('Ip/Internal/Content/assets/management/jquery.ip.layoutModal.js');
         ipAddJs('Ip/Internal/Content/assets/management/jquery.ip.block.js');
         ipAddJs('Ip/Internal/Content/assets/management/jquery.ip.widget.js');
         ipAddJs('Ip/Internal/Content/assets/management/exampleContent.js');
         ipAddJs('Ip/Internal/Content/assets/management/drag.js');
         ipAddJs('Ip/Internal/Content/Widget/Columns/assets/Columns.js');
         ipAddJs('Ip/Internal/Content/Widget/File/assets/File.js');
         ipAddJs('Ip/Internal/Content/Widget/File/assets/jquery.ipWidgetFile.js');
         ipAddJs('Ip/Internal/Content/Widget/File/assets/jquery.ipWidgetFileContainer.js');
         ipAddJs('Ip/Internal/Content/Widget/Form/assets/Form.js');
         ipAddJs('Ip/Internal/Content/Widget/Form/assets/FormContainer.js');
         ipAddJs('Ip/Internal/Content/Widget/Form/assets/FormField.js');
         ipAddJs('Ip/Internal/Content/Widget/Form/assets/FormOptions.js');
         ipAddJs('Ip/Internal/Content/Widget/Html/assets/Html.js');
         ipAddJs('Ip/Internal/Content/Widget/Video/assets/Video.js');
         ipAddJs('Ip/Internal/Content/Widget/Image/assets/Image.js');
         ipAddJs('Ip/Internal/Content/Widget/Gallery/assets/Gallery.js');
         ipAddJs('Ip/Internal/Content/Widget/Text/assets/Text.js');
         ipAddJs('Ip/Internal/Content/Widget/Heading/assets/Heading.js');
         ipAddJs('Ip/Internal/Content/Widget/Heading/assets/HeadingModal.js');
         ipAddJs('Ip/Internal/Content/Widget/Map/assets/Map.js');
     } else {
         ipAddJs('Ip/Internal/Content/assets/management.min.js');
     }
     ipAddJs('Ip/Internal/Core/assets/js/jquery-tools/jquery.tools.ui.scrollable.js');
     ipAddJs('Ip/Internal/Content/assets/jquery.ip.uploadImage.js');
     ipAddJsVariable('isMobile', \Ip\Internal\Browser::isMobile());
     ipAddJsVariable('ipWidgetLayoutModalTemplate', ipView('view/widgetLayoutModal.php')->render());
 }