function getFolders() { $folders = new RecursiveIteratorIterator($this->mail->getFolders(), RecursiveIteratorIterator::SELF_FIRST); $ary = array(); foreach ($folders as $local => $folder) { $ary[htmlspecialchars($local)] = htmlspecialchars($folder); } return $ary; }
/** * check for a theme asset * * @param string Theme to load * @param string Path to the asset * @return string|bool url path to asset or bool false */ public function findThemeAsset($theme, $asset) { if (!empty($theme)) { $Folders = $this->engine->getFolders(); if ($Folders->exists($theme)) { $this->Folder = $Folders->get($theme); $folderPath = rtrim($this->Folder->getPath(), '/'); $folderPath = $this->removeViewFromPath($folderPath); if (file_exists($folderPath . DS . $asset)) { $this->createSymlink($folderPath); return '/' . $this->assetDir . '/' . $this->asset['asset']; } } } return false; }