ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilFileUploadSettings Class Reference
+ Collaboration diagram for ilFileUploadSettings:

Static Public Member Functions

static setDragAndDropUploadEnabled ($newValue)
 Sets whether drag and drop file upload is enabled.
static isDragAndDropUploadEnabled ()
 Gets whether drag and drop file upload is enabled.
static setRepositoryDragAndDropUploadEnabled ($newValue)
 Sets whether drag and drop file upload in the repository is enabled.
static isRepositoryDragAndDropUploadEnabled ()
 Gets whether drag and drop file upload in the repository is enabled.
static setConcurrentUploads ($newValue)
 Sets the number of files that can be uploaded at the same time.
static getConcurrentUploads ()
 Gets the number of files that can be uploaded at the same time.

Data Fields

const CONCURRENT_UPLOADS_DEFAULT = 3
const CONCURRENT_UPLOADS_MAX = 10

Private Member Functions

 __construct ()
 Private constructor.

Static Private Member Functions

static getInstance ()
 Gets the instance of the ilFileUploadSettings.

Private Attributes

 $settings = null
 $dndUploadEnabled = true
 $repositoryDndUploadEnabled = true
 $concurrentUploads = self::CONCURRENT_UPLOADS_DEFAULT

Static Private Attributes

static $instance = null

Detailed Description

Definition at line 15 of file class.ilFileUploadSettings.php.

Constructor & Destructor Documentation

ilFileUploadSettings::__construct ( )
private

Private constructor.

Definition at line 53 of file class.ilFileUploadSettings.php.

{
$this->settings = new ilSetting("fileupload");
$this->dndUploadEnabled = $this->settings->get("dnd_upload_enabled", true) == true;
$this->repositoryDndUploadEnabled = $this->settings->get("repository_dnd_upload_enabled", true) == true;
$this->concurrentUploads = $this->settings->get("concurrent_upload_count", self::CONCURRENT_UPLOADS_DEFAULT);
}

Member Function Documentation

static ilFileUploadSettings::getConcurrentUploads ( )
static

Gets the number of files that can be uploaded at the same time.

Returns
int value

Definition at line 140 of file class.ilFileUploadSettings.php.

References getInstance().

Referenced by ilObjFileAccessSettingsGUI\editUploadSettings(), ilFileUploadGUI\getSharedHtml(), and ilObjFileAccessSettingsGUI\initUploadSettingsForm().

{
return self::getInstance()->concurrentUploads;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilFileUploadSettings::getInstance ( )
staticprivate

Gets the instance of the ilFileUploadSettings.

Returns
ilFileUploadSettings

Definition at line 149 of file class.ilFileUploadSettings.php.

References $instance.

Referenced by getConcurrentUploads(), isDragAndDropUploadEnabled(), isRepositoryDragAndDropUploadEnabled(), setConcurrentUploads(), setDragAndDropUploadEnabled(), and setRepositoryDragAndDropUploadEnabled().

{
if (self::$instance == null)
self::$instance = new ilFileUploadSettings();
}

+ Here is the caller graph for this function:

static ilFileUploadSettings::isDragAndDropUploadEnabled ( )
static

Gets whether drag and drop file upload is enabled.

Returns
boolean value

Definition at line 79 of file class.ilFileUploadSettings.php.

References getInstance().

Referenced by ilObjFileAccessSettingsGUI\editUploadSettings(), ilObjFileGUI\initCreationForms(), ilObjFileAccessSettingsGUI\initUploadSettingsForm(), and ilFileUploadUtil\isUploadAllowed().

{
return self::getInstance()->dndUploadEnabled;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilFileUploadSettings::isRepositoryDragAndDropUploadEnabled ( )
static

Gets whether drag and drop file upload in the repository is enabled.

Returns
boolean value

Definition at line 102 of file class.ilFileUploadSettings.php.

References getInstance().

Referenced by ilObjFileAccessSettingsGUI\editUploadSettings(), ilObjFileAccessSettingsGUI\initUploadSettingsForm(), and ilFileUploadUtil\isUploadAllowed().

{
return self::getInstance()->repositoryDndUploadEnabled;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilFileUploadSettings::setConcurrentUploads (   $newValue)
static

Sets the number of files that can be uploaded at the same time.

Parameters
intnew value
Returns
void

Definition at line 113 of file class.ilFileUploadSettings.php.

References $instance, CONCURRENT_UPLOADS_DEFAULT, CONCURRENT_UPLOADS_MAX, and getInstance().

Referenced by ilObjFileAccessSettingsGUI\saveUploadSettings().

{
// is number?
if (is_numeric($newValue))
{
// don't allow to large numbers
$newValue = (int)$newValue;
if ($newValue < 1)
$newValue = 1;
else if ($newValue > self::CONCURRENT_UPLOADS_MAX)
}
else
{
}
$instance->concurrentUploads = $newValue;
$instance->settings->set("concurrent_upload_count", $instance->concurrentUploads);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilFileUploadSettings::setDragAndDropUploadEnabled (   $newValue)
static

Sets whether drag and drop file upload is enabled.

Parameters
boolnew value
Returns
void

Definition at line 67 of file class.ilFileUploadSettings.php.

References $instance, and getInstance().

Referenced by ilObjFileAccessSettingsGUI\saveUploadSettings().

{
$instance->dndUploadEnabled = $newValue == true;
$instance->settings->set("dnd_upload_enabled", $instance->dndUploadEnabled);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilFileUploadSettings::setRepositoryDragAndDropUploadEnabled (   $newValue)
static

Sets whether drag and drop file upload in the repository is enabled.

Parameters
boolnew value
Returns
void

Definition at line 90 of file class.ilFileUploadSettings.php.

References $instance, and getInstance().

Referenced by ilObjFileAccessSettingsGUI\saveUploadSettings().

{
$instance->repositoryDndUploadEnabled = $newValue == true;
$instance->settings->set("repository_dnd_upload_enabled", $instance->repositoryDndUploadEnabled);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilFileUploadSettings::$concurrentUploads = self::CONCURRENT_UPLOADS_DEFAULT
private

Definition at line 48 of file class.ilFileUploadSettings.php.

ilFileUploadSettings::$dndUploadEnabled = true
private

Definition at line 36 of file class.ilFileUploadSettings.php.

ilFileUploadSettings::$instance = null
staticprivate
ilFileUploadSettings::$repositoryDndUploadEnabled = true
private

Definition at line 42 of file class.ilFileUploadSettings.php.

ilFileUploadSettings::$settings = null
private

Definition at line 30 of file class.ilFileUploadSettings.php.

const ilFileUploadSettings::CONCURRENT_UPLOADS_DEFAULT = 3

Definition at line 17 of file class.ilFileUploadSettings.php.

Referenced by setConcurrentUploads().

const ilFileUploadSettings::CONCURRENT_UPLOADS_MAX = 10

The documentation for this class was generated from the following file: