ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
ilFMSettings Class Reference

File Manager settings. More...

+ Collaboration diagram for ilFMSettings:

Public Member Functions

 enable ($a_status)
 Enable file manager. More...
 
 isEnabled ()
 check if enabled More...
 
 enableLocalFS ($a_stat)
 Enable local file system frame. More...
 
 isLocalFSEnabled ()
 Check if local file system frame is enabled by default. More...
 
 setMaxFileSize ($a_size)
 
 getMaxFileSize ()
 
 update ()
 Update settings. More...
 

Static Public Member Functions

static getInstance ()
 Get singleton instance. More...
 

Protected Member Functions

 getStorage ()
 Get storage. More...
 
 read ()
 Read settings. More...
 

Private Member Functions

 __construct ()
 Singleton constructor. More...
 

Private Attributes

 $storage = null
 
 $enabled = false
 
 $localFS = true
 
 $maxFileSize = 64
 

Static Private Attributes

static $instance = null
 

Detailed Description

File Manager settings.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 9 of file class.ilFMSettings.php.

Constructor & Destructor Documentation

◆ __construct()

ilFMSettings::__construct ( )
private

Singleton constructor.

Definition at line 21 of file class.ilFMSettings.php.

References read().

22  {
23  $this->storage = new ilSetting('fm');
24  $this->read();
25  }
ILIAS Setting Class.
read()
Read settings.
+ Here is the call graph for this function:

Member Function Documentation

◆ enable()

ilFMSettings::enable (   $a_status)

Enable file manager.

Parameters
bool$a_status

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

Referenced by read().

54  {
55  $this->enabled = $a_status;
56  }
+ Here is the caller graph for this function:

◆ enableLocalFS()

ilFMSettings::enableLocalFS (   $a_stat)

Enable local file system frame.

Parameters
<type>$a_stat

Definition at line 71 of file class.ilFMSettings.php.

Referenced by read().

72  {
73  $this->localFS = $a_stat;
74  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilFMSettings::getInstance ( )
static

Get singleton instance.

Returns
ilFMSettings

Definition at line 31 of file class.ilFMSettings.php.

Referenced by ilObjCategoryAccess\_getCommands(), ilObjFolderAccess\_getCommands(), ilObjGroupAccess\_getCommands(), ilObjCourseAccess\_getCommands(), ilContainerGUI\fileManagerLaunchObject(), ilSoapObjectAdministration\getTreeChilds(), ilContainerGUI\initHeaderAction(), ilFMSettingsGUI\initSettingsForm(), and ilFMSettingsGUI\update().

32  {
33  if(self::$instance)
34  {
35  return self::$instance;
36  }
37  return self::$instance = new ilFMSettings();
38  }
File Manager settings.
+ Here is the caller graph for this function:

◆ getMaxFileSize()

ilFMSettings::getMaxFileSize ( )

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

References $maxFileSize.

Referenced by update().

91  {
92  return $this->maxFileSize;
93  }
+ Here is the caller graph for this function:

◆ getStorage()

ilFMSettings::getStorage ( )
protected

Get storage.

Returns
ilSetting

Definition at line 44 of file class.ilFMSettings.php.

References $storage.

Referenced by read(), and update().

45  {
46  return $this->storage;
47  }
+ Here is the caller graph for this function:

◆ isEnabled()

ilFMSettings::isEnabled ( )

check if enabled

Returns
bool

Definition at line 62 of file class.ilFMSettings.php.

References $enabled.

Referenced by update().

63  {
64  return $this->enabled;
65  }
+ Here is the caller graph for this function:

◆ isLocalFSEnabled()

ilFMSettings::isLocalFSEnabled ( )

Check if local file system frame is enabled by default.

Returns
<type>

Definition at line 80 of file class.ilFMSettings.php.

References $localFS.

Referenced by update().

81  {
82  return $this->localFS;
83  }
+ Here is the caller graph for this function:

◆ read()

ilFMSettings::read ( )
protected

Read settings.

Definition at line 109 of file class.ilFMSettings.php.

References enable(), enableLocalFS(), getStorage(), and setMaxFileSize().

Referenced by __construct().

110  {
111  $this->enable($this->getStorage()->get('enabled', $this->enabled));
112  $this->enableLocalFS($this->getStorage()->get('local'), $this->localFS);
113  $this->setMaxFileSize($this->getStorage()->get('maxFileSize',$this->maxFileSize));
114 
115  }
enable($a_status)
Enable file manager.
getStorage()
Get storage.
setMaxFileSize($a_size)
enableLocalFS($a_stat)
Enable local file system frame.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMaxFileSize()

ilFMSettings::setMaxFileSize (   $a_size)

Definition at line 85 of file class.ilFMSettings.php.

Referenced by read().

86  {
87  $this->maxFileSize = $a_size;
88  }
+ Here is the caller graph for this function:

◆ update()

ilFMSettings::update ( )

Update settings.

Definition at line 99 of file class.ilFMSettings.php.

References getMaxFileSize(), getStorage(), isEnabled(), and isLocalFSEnabled().

100  {
101  $this->getStorage()->set('enabled',(int) $this->isEnabled());
102  $this->getStorage()->set('local',(int) $this->isLocalFSEnabled());
103  $this->getStorage()->set('maxFileSize', (int) $this->getMaxFileSize());
104  }
isLocalFSEnabled()
Check if local file system frame is enabled by default.
isEnabled()
check if enabled
getStorage()
Get storage.
+ Here is the call graph for this function:

Field Documentation

◆ $enabled

ilFMSettings::$enabled = false
private

Definition at line 14 of file class.ilFMSettings.php.

Referenced by isEnabled().

◆ $instance

ilFMSettings::$instance = null
staticprivate

Definition at line 11 of file class.ilFMSettings.php.

◆ $localFS

ilFMSettings::$localFS = true
private

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

Referenced by isLocalFSEnabled().

◆ $maxFileSize

ilFMSettings::$maxFileSize = 64
private

Definition at line 16 of file class.ilFMSettings.php.

Referenced by getMaxFileSize().

◆ $storage

ilFMSettings::$storage = null
private

Definition at line 13 of file class.ilFMSettings.php.

Referenced by getStorage().


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