コード例 #1
0
ファイル: leomanagewidgets.php プロジェクト: pacxs/pacxscom
 private function _setGroupData($groupsList, $hook_name)
 {
     foreach ($groupsList as &$group) {
         if (isset($group['columns'])) {
             foreach ($group['columns'] as &$column) {
                 $pages = array();
                 if (isset($column['pages']) && $column['pages']) {
                     $column['pages'] = str_replace(', ', ',', $column['pages']);
                     $pages = explode(',', $column['pages']);
                 }
                 if (isset($column['rows'])) {
                     foreach ($column['rows'] as &$row) {
                         //is a widget
                         if ($row['type'] == '0') {
                             $content = $this->_widgets->renderContent($row['key_widget']);
                             $content['type'] = LeomanagewidgetsHelper::processWidgetType($hook_name, $row['key_widget'], $content['type'], $content['data']);
                             //if ($this->_load_owl_carousel_lib == false)
                             //	$this->_load_owl_carousel_lib = LeomanagewidgetsHelper::enableLoadOwlCarouselLib($content['data']);
                             $row['content'] = $this->getWidgetContent($hook_name, $row['key_widget'], $content['type'], $content['data']);
                             //is a module
                         } else {
                             if (isset($row['module_name']) && isset($row['hook_name']) && $row['module_name'] && $row['hook_name']) {
                                 $row['content'] = $this->execModuleHook($row['hook_name'], array(), $row['module_name'], false, $this->context->shop->id);
                             }
                         }
                     }
                 }
             }
         }
     }
     # validate module
     unset($pages);
     return $groupsList;
 }
コード例 #2
0
ファイル: leomanagewidgets.php プロジェクト: evgrishin/se1614
 private function _setGroupData($groupsList, $hook_name)
 {
     foreach ($groupsList as &$group) {
         if (isset($group["columns"])) {
             foreach ($group["columns"] as &$column) {
                 $pages = array();
                 if (isset($column["pages"]) && $column["pages"]) {
                     $column["pages"] = str_replace(", ", ",", $column["pages"]);
                     $pages = explode(",", $column["pages"]);
                 }
                 if (isset($column["rows"])) {
                     foreach ($column["rows"] as &$row) {
                         //is a widget
                         if ($row["type"] == "0") {
                             $content = $this->_widgets->renderContent($row["key_widget"]);
                             $content['type'] = LeomanagewidgetsHelper::processWidgetType($hook_name, $row["key_widget"], $content['type'], $content['data']);
                             if ($this->_load_owl_carousel_lib == false) {
                                 $this->_load_owl_carousel_lib = LeomanagewidgetsHelper::enableLoadOwlCarouselLib($content['data']);
                             }
                             $row["content"] = $this->getWidgetContent($hook_name, $row["key_widget"], $content['type'], $content['data']);
                             //is a module
                         } else {
                             if (isset($row["module_name"]) && isset($row["hook_name"]) && $row["module_name"] && $row["hook_name"]) {
                                 $row["content"] = $this->execModuleHook($row["hook_name"], array(), $row["module_name"], false, $this->context->shop->id);
                             }
                         }
                     }
                 }
             }
         }
     }
     return $groupsList;
 }