public function addCustomDashboardIcons(&$view, &$counter) { $icon = ''; if (isset($this->componentData->custom_admin_views) && ComponentbuilderHelper::checkArray($this->componentData->custom_admin_views)) { foreach ($this->componentData->custom_admin_views as $nr => $menu) { if (!isset($this->customAdminAdded[$menu['settings']->code]) && $menu['dashboard_list'] == 1 && $menu['before'] == $view['adminview']) { $type = ComponentbuilderHelper::imageInfo($menu['settings']->icon); if ($type) { $type = $type . "."; // icon builder loader $this->iconBuilder[$type . $menu['settings']->code] = $menu['settings']->icon; } else { $type = 'png.'; } // build lang $langName = $menu['settings']->name . '<br /><br />'; $langKey = $this->langPrefix . '_DASHBOARD_' . $menu['settings']->CODE; // add to lang $this->langContent[$this->lang][$langKey] = $langName; // set icon if ($counter == 0) { $counter++; $icon .= "'" . $type . $menu['settings']->code . "'"; } else { $counter++; $icon .= ", '" . $type . $menu['settings']->code . "'"; } } elseif (!isset($this->customAdminAdded[$menu['settings']->code]) && $menu['dashboard_list'] == 1 && empty($menu['before'])) { $type = ComponentbuilderHelper::imageInfo($menu['settings']->icon); if ($type) { $type = $type . "."; // icon builder loader $this->iconBuilder[$type . $menu['settings']->code] = $menu['settings']->icon; } else { $type = 'png.'; } // build lang $langName = $menu['settings']->name . '<br /><br />'; $langKey = $this->langPrefix . '_DASHBOARD_' . $menu['settings']->CODE; // add to lang $this->langContent[$this->lang][$langKey] = $langName; // set icon $this->lastCustomDashboardIcon[$nr] = ", '" . $type . $menu['settings']->code . "'"; } } } // see if we should have custom menus if (isset($this->componentData->custommenus) && ComponentbuilderHelper::checkArray($this->componentData->custommenus)) { foreach ($this->componentData->custommenus as $nr => $menu) { $nr = $nr + 100; $nameList = ComponentbuilderHelper::safeString($menu['name_code']); $nameUpper = ComponentbuilderHelper::safeString($menu['name_code'], 'U'); if ($menu['dashboard_list'] == 1 && $view['adminview'] == $menu['before']) { if (isset($menu['link']) && ComponentbuilderHelper::checkString($menu['link'])) { // TODO must look at adding custom links to icons aswell return ''; } else { $type = ComponentbuilderHelper::imageInfo('images/' . $menu['icon']); if ($type) { $type = $type . "."; // icon builder loader $this->iconBuilder[$type . $nameList] = 'images/' . $menu['icon']; } else { $type = 'png.'; } // build lang $langName = $menu['name'] . '<br /><br />'; $langKey = $this->langPrefix . '_DASHBOARD_' . $nameUpper; // add to lang $this->langContent[$this->lang][$langKey] = $langName; // set icon if ($counter == 0) { $counter++; $icon .= "'" . $type . $nameList . "'"; } else { $counter++; $icon .= ", '" . $type . $nameList . "'"; } } } elseif ($menu['dashboard_list'] == 1 && empty($menu['before'])) { if (isset($menu['link']) && ComponentbuilderHelper::checkString($menu['link'])) { // TODO must look at adding custom links to icons aswell return ''; } else { $type = ComponentbuilderHelper::imageInfo('images/' . $menu['icon']); if ($type) { $type = $type . "."; // icon builder loader $this->iconBuilder[$type . $nameList] = 'images/' . $menu['icon']; } else { $type = 'png.'; } // build lang $langName = $menu['name'] . '<br /><br />'; $langKey = $this->langPrefix . '_DASHBOARD_' . $nameUpper; // add to lang $this->langContent[$this->lang][$langKey] = $langName; // set icon $this->lastCustomDashboardIcon[$nr] = ", '" . $type . $nameList . "'"; } } } } return $icon; }