public function connectWith(DatasetUIMetaData $primaryDatasetUIMetaData, $datasetName, $referencePath = NULL) { // do not store generated UI meta data if reference path is provided for the following reasons: // * there is unlimited number of possible reference paths; // * it is almost impossible to delete cached items if dataset structure changes $isSelfReferenced = $this->isSelfReferenced($referencePath); $connectedDatasetCacheEntryName = isset($isSelfReferenced) ? $this->prepareCacheEntryName($datasetName, TRUE) : NULL; $connectedDatasetUIMetaData = isset($connectedDatasetCacheEntryName) ? $this->cache->getCachedEntry($connectedDatasetCacheEntryName) : NULL; if (!isset($connectedDatasetUIMetaData)) { $connectReferencePath = isset($referencePath) ? $referencePath : self::$REFERENCE_PATH__DEFAULT; $connectedDatasetUIMetaData = $this->generateDatasetUIMetaData($datasetName, $connectReferencePath); if (isset($connectedDatasetCacheEntryName)) { $this->cache->cacheEntry($connectedDatasetCacheEntryName, $connectedDatasetUIMetaData); } } $primaryDatasetUIMetaData->registerConnectedDataset($connectedDatasetUIMetaData); }