/** * @param PackageInterface $package * * @return string */ public function getPackageBasePath(PackageInterface $package) { $extra = $package->getExtra(); print_r($extra); // get dependency glue packages return parent::getPackageBasePath($package); }
/** * {@inheritDoc} */ public function getPackageBasePath(PackageInterface $package) { if (!$this->isSharedInstallEnabled($package)) { return parent::getPackageBasePath($package); } return $this->getSharedDir() . DIRECTORY_SEPARATOR . $package->getUniqueName(); }
/** * {@inheritDoc} */ public function getPackageBasePath(PackageInterface $package) { if (empty($this->drupalLibraryMap[$package->getPrettyName()])) { $path = parent::getPackageBasePath($package); } else { $path = $this->drupalLibrariesPath . $this->drupalLibraryMap[$package->getPrettyName()]; } return $path; }
/** * An override to return the correct destination for a package. * * @param PackageInterface $package * @return string */ public function getPackageBasePath(PackageInterface $package) { $parts = explode('_', $package->getName()); if ('qcubed/plugin' === $parts[0]) { $this->initializeVendorDir(); return ($this->vendorDir ? $this->vendorDir . '/' : '') . 'qcubed/plugin/' . $parts[1]; } else { return parent::getPackageBasePath($package); } }
/** * @param PackageInterface $package * * @return string */ public function getPackageBasePath(PackageInterface $package) { $root = $this->composer->getPackage(); if ($rootPath = $this->getRootPath($root, $package)) { return $rootPath . "/" . $package->getName(); } if ($packagePath = $this->getPackagePath($package)) { return $packagePath . "/" . $package->getName(); } return parent::getPackageBasePath($package); }
/** * {@inheritdoc} */ protected function getPackageBasePath(PackageInterface $package) { switch ($package->getType()) { case self::TYPE_MOODLE_SOURCE: $basePath = $this->getMoodleDir(); break; default: $basePath = parent::getPackageBasePath($package); } return $basePath; }
/** * {@inheritDoc} */ public function getPackageBasePath(PackageInterface $package) { $packageName = strtolower($package->getName()); if (isset($this->cached[$packageName])) { return $this->cached[$packageName]; } if ($packageName === 'drupal/drupal') { $path = $this->drupalRoot; } else { list($vendor, $name) = explode('/', $packageName); $path = ''; foreach (array('module' => 'drupalModules', 'theme' => 'drupalThemes') as $type => $drupalType) { if ($package->getType() === "drupal-{$type}") { $subdir = "project"; foreach (array($packageName, "{$vendor}/*") as $key) { if (isset($this->{$drupalType}[$key])) { $subdir = $this->{$drupalType}[$key]; } } $path = "{$this->drupalRoot}/sites/all/{$type}s/{$subdir}/{$name}"; } } if (!$path) { foreach (array($packageName, "{$vendor}/*") as $key) { if (isset($this->drupalLibraries[$key])) { $path = $this->drupalRoot . '/sites/all/libraries/'; $path .= empty($this->drupalLibraries[$key]) ? $name : $this->drupalLibraries[$key]; } } } } if ($path) { $this->io->write("Installing <info>{$packageName}</info> in <info>{$path}.</info>"); } else { $path = parent::getPackageBasePath($package); } $this->cached[$packageName] = $path; return $path; }
/** * {@inheritDoc} */ protected function getPackageBasePath(PackageInterface $package) { $this->initializeVendorDir(); $path = $this->getYiiPackageBasePath($package->getType(), $this->yiiPaths, $this->vendorDir, $package->getName()); if ($path === false) { return parent::getPackageBasePath($package); } return $path; }
protected function getPackageBasePath(PackageInterface $package) { if ($this->_isInUse) { // If certains packages are specified to be global if (!empty($this->_globalPackages) && !in_array($package->getName(), $this->_globalPackages)) { return parent::getPackageBasePath($package); } $this->initializeGlobalDir(); $this->initializeVendorDir(); return $this->_globalDir . '/' . $this->getPackagePath($package); } else { return parent::getPackageBasePath($package); } }