Пример #1
0
 protected function getPackagePathUrl($base)
 {
     $assets = Prado::getApplication()->getAssetManager();
     if (strpos($base, $assets->getBaseUrl()) === false) {
         if (($dir = Prado::getPathOfNameSpace($base)) !== null) {
             $base = $dir;
         }
         return array($assets->getPublishedPath($base), $assets->publishFilePath($base));
     } else {
         return array($assets->getBasePath() . str_replace($assets->getBaseUrl(), '', $base), $base);
     }
 }
Пример #2
0
 protected function copyCustomPlugins($url)
 {
     if ($plugins = $this->getCustomPluginPath()) {
         $assets = $this->getApplication()->getAssetManager();
         $path = is_dir($plugins) ? $plugins : Prado::getPathOfNameSpace($plugins);
         $dest = $assets->getBasePath() . '/' . basename($url) . '/tiny_mce/plugins/';
         if (!is_dir($dest) || $this->getApplication()->getMode() !== TApplicationMode::Performance) {
             $assets->copyDirectory($path, $dest);
         }
     }
 }