コード例 #1
0
 protected function installPluginAssets($name, $path)
 {
     $webDir = $path . '/web';
     if (is_dir($webDir)) {
         $filesystem = new sfFilesystem();
         $filesystem->relativeSymlink($webDir, sfConfig::get('sf_web_dir') . '/' . $name, true);
     }
 }
コード例 #2
0
 /**
  * Installs web content for a plugin.
  *
  * @param string $plugin The plugin name
  * @param string $dir    The plugin directory
  */
 protected function installPluginAssets($plugin, $dir)
 {
     $webDir = $dir . DIRECTORY_SEPARATOR . 'web';
     if (is_dir($webDir)) {
         $filesystem = new sfFilesystem();
         $filesystem->relativeSymlink($webDir, sfConfig::get('sf_web_dir') . DIRECTORY_SEPARATOR . $plugin, true);
     }
 }
コード例 #3
0
 /**
  * Installs web content for a plugin.
  *
  * @param string $plugin The plugin name
  */
 public function installWebContent($plugin, $sourceDirectory)
 {
     $webDir = $sourceDirectory . DIRECTORY_SEPARATOR . $plugin . DIRECTORY_SEPARATOR . 'web';
     if (is_dir($webDir)) {
         $this->dispatcher->notify(new sfEvent($this, 'application.log', array('Installing web data for plugin')));
         $filesystem = new sfFilesystem();
         $filesystem->relativeSymlink($webDir, $this->environment->getOption('web_dir') . DIRECTORY_SEPARATOR . $plugin, true);
     }
 }