/**
  * Resets user specific metadata to default
  */
 public function resetToDefault()
 {
     if ($this->implementation->isDeployed()) {
         $this->implementation->resetToDefault();
         $this->_clearCaches();
     }
 }
示例#2
0
 public function __construct($implementation)
 {
     $this->implementation = $implementation;
     $this->_viewdefs = array_change_key_case($this->implementation->getViewdefs());
     $this->_fielddefs = $this->implementation->getFielddefs();
 }
示例#3
0
 /**
  * Removes the metadata files for all known studio layouts.
  * 
  * @return html output record of the files deleted
  */
 function removeCustomLayouts()
 {
     $module = StudioModuleFactory::getStudioModule($this->module);
     $sources = $module->getViewMetadataSources();
     $out = "";
     foreach ($sources as $view) {
         $file = DeployedMetaDataImplementation::getFileName($view['type'], $this->module);
         if (file_exists($file)) {
             unlink($file);
             $out .= "Removed layout {$view['type']}.php<br/>";
         }
     }
     // now clear the cache
     include_once 'include/TemplateHandler/TemplateHandler.php';
     TemplateHandler::clearCache($this->module);
     return $out;
 }