/**
  * Returns instance of Tinebase_Config
  *
  * @return Tinebase_Config
  */
 public static function getInstance()
 {
     if (self::$_instance === NULL) {
         self::$_instance = new self();
     }
     return self::$_instance;
 }
 /**
  * save expressodriver settings
  *
  * @param array $_settings
  * @return Crm_Model_Config
  *
  */
 public function saveConfigSettings($_settings)
 {
     if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
         Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' Updating Crm Settings: ' . print_r($_settings, TRUE));
     }
     $_settings = array('default' => $_settings['default'], 'adapters' => $_settings['adapters']);
     Expressodriver_Config::getInstance()->set('expressodriverSettings', $_settings);
     return $this->getConfigSettings();
 }
 /**
  * initialize key fields
  */
 protected function _initializeKeyFields()
 {
     $cb = new Tinebase_Backend_Sql(array('modelName' => 'Tinebase_Model_Config', 'tableName' => 'config'));
     $externalDrivers = array('name' => Expressodriver_Config::EXTERNAL_DRIVERS, 'records' => array(array('id' => 'webdav', 'value' => 'Webdav', 'system' => true), array('id' => 'owncloud', 'value' => 'Owncloud', 'system' => true)));
     Expressodriver_Config::getInstance()->set(Expressodriver_Config::EXTERNAL_DRIVERS, $externalDrivers);
 }