di = $di; } /** * @return \Box_Di */ public function getDi() { return $this->di; } public function getPairs() { $themeService = $this->di['mod_service']('theme'); $code = $themeService->getCurrentClientAreaThemeCode(); $paths = array( BB_PATH_THEMES . DIRECTORY_SEPARATOR . $code . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR, BB_PATH_MODS . DIRECTORY_SEPARATOR . 'mod_page' . DIRECTORY_SEPARATOR . 'html_client' . DIRECTORY_SEPARATOR, ); $list = array(); foreach($paths as $path) { foreach(glob($path.'mod_page_*.phtml') as $file) { $file = str_replace('mod_page_', '', pathinfo($file, PATHINFO_FILENAME)); $list[$file] = ucwords(strtr($file, array('-'=>' ', '_'=>' '))); } } return $list; } }