public function save()
 {
     global $tpl, $ilCtrl;
     $this->initConfigurationForm();
     if ($this->form->checkInput()) {
         // Save Checkbox Values
         foreach ($this->fields as $key => $item) {
             $this->object->setValue($key, $this->form->getInput($key));
             if (is_array($item["subelements"])) {
                 foreach ($item["subelements"] as $subkey => $subitem) {
                     $this->object->setValue($key . "_" . $subkey, $this->form->getInput($key . "_" . $subkey));
                 }
             }
         }
         $ilCtrl->redirect($this, "configure");
     } else {
         $this->form->setValuesByPost();
         $tpl->setContent($this->form->getHtml());
     }
 }
Ejemplo n.º 2
0
<#1>
<?php 
include_once "./Customizing/global/plugins/Modules/Cloud/CloudHook/OneDrive/classes/class.ilOneDrivePlugin.php";
$plugin_object = ilOneDrivePlugin::getInstance();
$fields = array('id' => array('type' => 'integer', 'length' => 8, 'notnull' => true), 'access_token' => array('type' => 'text', 'length' => 2000), 'refresh_token' => array('type' => 'text', 'length' => 2000), 'public_link' => array('type' => 'boolean'), 'max_file_size' => array('type' => 'text', 'length' => 256), 'valid_through' => array('type' => 'integer', 'length' => 8), 'validation_user_id' => array('type' => 'integer', 'length' => 8));
global $ilDB;
$ilDB->createTable($plugin_object->getPluginTableName(), $fields);
$ilDB->addPrimaryKey($plugin_object->getPluginTableName(), array("id"));
?>
<#2>
<?php 
include_once "./Modules/Cloud/classes/class.ilCloudPluginConfig.php";
include_once "./Customizing/global/plugins/Modules/Cloud/CloudHook/OneDrive/classes/class.ilOneDrivePlugin.php";
$plugin_object = ilOneDrivePlugin::getInstance();
$config_object = new ilCloudPluginConfig($plugin_object->getPluginConfigTableName());
$config_object->initDB();
Ejemplo n.º 3
0
<#1>
<?php 
include_once "./Customizing/global/plugins/Modules/Cloud/CloudHook/Dropbox/classes/class.ilDropboxPlugin.php";
$plugin_object = new ilDropboxPlugin();
$fields = array('id' => array('type' => 'integer', 'length' => 8, 'notnull' => true), 'token' => array('type' => 'text', 'length' => 256), 'public_link' => array('type' => 'boolean'));
if (!$ilDB->tableExists($plugin_object->getPluginTableName())) {
    $ilDB->createTable($plugin_object->getPluginTableName(), $fields);
    $ilDB->addPrimaryKey($plugin_object->getPluginTableName(), array("id"));
}
?>
<#2>
<?php 
include_once "./Modules/Cloud/classes/class.ilCloudPluginConfig.php";
$plugin_object = new ilDropboxPlugin();
$config_object = new ilCloudPluginConfig($plugin_object->getPluginConfigTableName());
$config_object->initDB();
$config_object->setAppName("Custom App Name");
$config_object->setAppKey("Custom App Key");
$config_object->setAppSecret("Custom App Secret");
$config_object->setConfAllowPublicLinks(false);
$config_object->setDefaultAllowPublicLinks(true);
$config_object->setDefaultMaxFileSize(30);
?>
<#3>
<?php 
include_once "./Customizing/global/plugins/Modules/Cloud/CloudHook/Dropbox/classes/class.ilDropboxPlugin.php";
$plugin_object = new ilDropboxPlugin();
if (!$ilDB->tableColumnExists($plugin_object->getPluginTableName(), 'max_file_size')) {
    $ilDB->addTableColumn($plugin_object->getPluginTableName(), "max_file_size", array('type' => 'text', 'length' => 256));
}
Ejemplo n.º 4
0
 /**
  * @param $key
  * @param $value
  *
  * @throws ilCloudPluginConfigException
  */
 public function setValue($key, $value)
 {
     unset(self::$value_cache[$key]);
     parent::setValue($key, $value);
     // TODO: Change the autogenerated stub
 }