protected function _expandPlugin($file)
{
preg_match(self::PLUGIN_PATTERN, $file, $matches);
if (empty($matches[1]) || empty($matches[2])) {
throw new RuntimeException('Missing required parameters');
}
if (!Plugin::loaded($matches[1])) {
throw new RuntimeException($matches[1] . ' is not a loaded plugin.');
}
$path = Plugin::path($matches[1]);
return $path . 'webroot' . DS . $matches[2];
}