Пример #1
0
 /**
  * Adds the information from the emconf array and TER to the extension information
  *
  * @param array $extensions
  * @return array
  */
 public function enrichExtensionsWithEmConfAndTerInformation(array $extensions)
 {
     $extensions = $this->enrichExtensionsWithEmConfInformation($extensions);
     foreach ($extensions as $extensionKey => $properties) {
         $terObject = $this->getExtensionTerData($extensionKey, $extensions[$extensionKey]['version']);
         if ($terObject !== null) {
             $extensions[$extensionKey]['terObject'] = $terObject;
             $extensions[$extensionKey]['updateAvailable'] = false;
             $extensions[$extensionKey]['updateToVersion'] = null;
             $extensionToUpdate = $this->installUtility->getUpdateableVersion($terObject);
             if ($extensionToUpdate !== false) {
                 $extensions[$extensionKey]['updateAvailable'] = true;
                 $extensions[$extensionKey]['updateToVersion'] = $extensionToUpdate;
             }
         }
     }
     return $extensions;
 }
Пример #2
0
	/**
	 * Adds the information from the emconf array to the extension information
	 *
	 * @param array $extensions
	 * @return array
	 */
	public function enrichExtensionsWithEmConfAndTerInformation(array $extensions) {
		foreach ($extensions as $extensionKey => $properties) {
			$emconf = $this->emConfUtility->includeEmConf($properties);
			if ($emconf) {
				$extensions[$extensionKey] = array_merge($emconf, $properties);
				$terObject = $this->getExtensionTerData($extensionKey, $extensions[$extensionKey]['version']);
				if ($terObject !== NULL) {
					$extensions[$extensionKey]['terObject'] = $terObject;
					$extensions[$extensionKey]['updateAvailable'] = FALSE;
					$extensions[$extensionKey]['updateToVersion'] = NULL;
					$extensionToUpdate = $this->installUtility->getUpdateableVersion($terObject);
					if ($extensionToUpdate !== FALSE) {
						$extensions[$extensionKey]['updateAvailable'] = TRUE;
						$extensions[$extensionKey]['updateToVersion'] = $extensionToUpdate;
					}
				}
			} else {
				unset($extensions[$extensionKey]);
			}
		}
		return $extensions;
	}