private function loadOsmlLibrary()
 {
     $container = $this->gadgetContext->getContainer();
     $containerConfig = $this->gadgetContext->getContainerConfig();
     $gadgetsFeatures = $containerConfig->getConfig($container, 'gadgets.features');
     if (!isset($gadgetsFeatures['osml'])) {
         throw new ExpressionException("Missing OSML configuration key in config/config.js");
     } elseif (!isset($gadgetsFeatures['osml']['library'])) {
         throw new ExpressionException("Missing OSML.Library configuration key in config/config.js");
     }
     $osmlLibrary = Config::get('container_path') . str_replace('config/', '', $gadgetsFeatures['osml']['library']);
     if (!File::exists($osmlLibrary)) {
         throw new ExpressionException("Missing OSML Library ({$osmlLibrary})");
     }
     $this->addTemplateLibrary(file_get_contents($osmlLibrary));
     $this->osmlLoaded = true;
 }