* {@inheritdoc}
*/
public function getResUrl($key) {
- return $this->baseUrl . $this->getRelPath($key);
+ return $this->baseUrl . $this->getRelUrl($key);
}
/**
return $this->relPaths;
}
+ /**
+ * Determine the relative path of an extension directory
+ *
+ * @return string
+ * @throws CRM_Extension_Exception
+ */
+ protected function getRelUrl($key) {
+ $relUrls = $this->getRelUrls();
+ if (! isset($relUrls[$key])) {
+ throw new CRM_Extension_Exception_MissingException("Failed to find extension: $key");
+ }
+ return $relUrls[$key];
+ }
+
/**
* Scan $basedir for a list of extension-keys
*