/**
  * Builds asset file path based off url
  *
  * @param string $url Asset URL
  * @return string Absolute path for asset file
  */
 protected function _getAssetFile($url)
 {
     $pattern = '/^cms\\/widget\\/([a-z\\.]+)\\/(.*)$/i';
     if (preg_match($pattern, $url, $matches)) {
         $widgetIdentifier = $matches[1];
         $assetPath = $matches[2];
         if (!WidgetManager::widgetExists($widgetIdentifier)) {
             throw new \Cake\Network\Exception\NotFoundException("Widget {$widgetIdentifier} could not be found");
         }
         $widget = WidgetFactory::identifierFactory($widgetIdentifier);
         $assetFile = $widget->getWebrootPath() . $assetPath;
         return $assetFile;
     }
 }