ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilCloudFileNode Class Reference

ilCloudFileTree class More...

+ Collaboration diagram for ilCloudFileNode:

Public Member Functions

 __construct ($path, $id)
 
 setId ($id)
 
 getId ()
 
 setLoadingComplete ($complete)
 
 getLoadingComplete ()
 
 setPath ($path="/")
 
 getPath ()
 
 addChild ($path)
 
 removeChild ($path)
 
 getChildrenPathes ()
 
 hasChildren ()
 
 setParentId ($id)
 
 getParentId ()
 
 setIsDir ($is_dir)
 
 getIsDir ()
 
 setSize ($size)
 
 getSize ()
 
 setModified ($modified)
 
 getModified ()
 
 setIconPath ($path)
 
 getIconPath ()
 
 setMixed ($mixed)
 
 getMixed ()
 
 getJSONEncode ()
 

Protected Attributes

 $id = 0
 
 $path = ""
 
 $parent_id = -1
 
 $children = array()
 
 $loading_complete = false
 
 $is_dir = false
 
 $size = 0
 
 $modified = 0
 
 $created = 0
 
 $icon_path = ""
 
 $mixed
 

Detailed Description

ilCloudFileTree class

Representation of a node (a file or a folder) in the file tree

Author
Timon Amstutz timon.nosp@m..ams.nosp@m.tutz@.nosp@m.ilub.nosp@m..unib.nosp@m.e.ch
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilCloudFileNode::__construct (   $path,
  $id 
)
Parameters
string$path

Definition at line 73 of file class.ilCloudFileNode.php.

References $id, $path, setId(), and setPath().

+ Here is the call graph for this function:

Member Function Documentation

◆ addChild()

ilCloudFileNode::addChild (   $path)
Parameters
$path

Definition at line 130 of file class.ilCloudFileNode.php.

References $path.

131  {
132  if (!isset($this->children[$path])) {
133  $this->children[$path] = $path;
134  }
135  }

◆ getChildrenPathes()

ilCloudFileNode::getChildrenPathes ( )
Returns
array|null

Definition at line 150 of file class.ilCloudFileNode.php.

References $children, and hasChildren().

Referenced by getJSONEncode(), and ilCloudFileTree\getSortedListOfChildren().

151  {
152  if ($this->hasChildren()) {
153  return $this->children;
154  }
155  return null;
156  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getIconPath()

ilCloudFileNode::getIconPath ( )
Returns
string

Definition at line 242 of file class.ilCloudFileNode.php.

References $icon_path.

Referenced by ilCloudPluginFileTreeGUI\getItemHtml().

243  {
244  return $this->icon_path;
245  }
+ Here is the caller graph for this function:

◆ getId()

ilCloudFileNode::getId ( )
Returns
int

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

References $id.

Referenced by ilCloudPluginFileTreeGUI\getItemHtml(), getJSONEncode(), ilCloudPluginFileTreeGUI\getLinkToFolder(), and ilCloudPluginFileTreeGUI\getLocatorHtml().

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

◆ getIsDir()

ilCloudFileNode::getIsDir ( )
Returns
bool

Definition at line 194 of file class.ilCloudFileNode.php.

References $is_dir.

Referenced by ilCloudPluginFileTreeGUI\getItemHtml(), and getJSONEncode().

195  {
196  return $this->is_dir;
197  }
+ Here is the caller graph for this function:

◆ getJSONEncode()

ilCloudFileNode::getJSONEncode ( )
Returns
array

Definition at line 267 of file class.ilCloudFileNode.php.

References array, getChildrenPathes(), getId(), getIsDir(), getLoadingComplete(), getParentId(), getPath(), and getSize().

268  {
269  $node = array();
270  $node["id"] = $this->getId();
271  $node["is_dir"] = $this->getIsDir();
272  $node["path"] = $this->getPath();
273  $node["parent_id"] = $this->getParentId();
274  $node["loading_complete"] = $this->getLoadingComplete();
275  $node["children"] = $this->getChildrenPathes();
276  $node["size"] = $this->getSize();
277 
278  return $node;
279  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ getLoadingComplete()

ilCloudFileNode::getLoadingComplete ( )
Returns
bool

Definition at line 106 of file class.ilCloudFileNode.php.

References $loading_complete.

Referenced by getJSONEncode().

107  {
109  }
+ Here is the caller graph for this function:

◆ getMixed()

ilCloudFileNode::getMixed ( )
Returns
mixed

Definition at line 258 of file class.ilCloudFileNode.php.

References $mixed.

259  {
260  return $this->mixed;
261  }

◆ getModified()

ilCloudFileNode::getModified ( )
Returns
int

Definition at line 226 of file class.ilCloudFileNode.php.

References $modified.

Referenced by ilCloudPluginFileTreeGUI\getItemHtml().

227  {
228  return $this->modified;
229  }
+ Here is the caller graph for this function:

◆ getParentId()

ilCloudFileNode::getParentId ( )
Returns
int

Definition at line 178 of file class.ilCloudFileNode.php.

References $parent_id.

Referenced by getJSONEncode(), ilCloudPluginFileTreeGUI\getLinkToFolder(), and ilCloudPluginFileTreeGUI\getLocatorHtml().

179  {
180  return $this->parent_id;
181  }
+ Here is the caller graph for this function:

◆ getPath()

ilCloudFileNode::getPath ( )
Returns
string

Definition at line 122 of file class.ilCloudFileNode.php.

References $path.

Referenced by ilCloudPluginFileTreeGUI\getItemHtml(), getJSONEncode(), ilCloudPluginFileTreeGUI\getLinkToFolder(), and ilCloudPluginFileTreeGUI\getLocatorHtml().

123  {
124  return $this->path;
125  }
+ Here is the caller graph for this function:

◆ getSize()

ilCloudFileNode::getSize ( )
Returns
int

Definition at line 210 of file class.ilCloudFileNode.php.

References $size.

Referenced by ilCloudPluginFileTreeGUI\getItemHtml(), and getJSONEncode().

211  {
212  return $this->size;
213  }
+ Here is the caller graph for this function:

◆ hasChildren()

ilCloudFileNode::hasChildren ( )
Returns
bool

Definition at line 161 of file class.ilCloudFileNode.php.

Referenced by getChildrenPathes().

162  {
163  return (count($this->children) > 0);
164  }
+ Here is the caller graph for this function:

◆ removeChild()

ilCloudFileNode::removeChild (   $path)
Parameters
$path

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

References $path.

141  {
142  if (isset($this->children[$path])) {
143  unset($this->children[$path]);
144  }
145  }

◆ setIconPath()

ilCloudFileNode::setIconPath (   $path)
Parameters
$path

Definition at line 234 of file class.ilCloudFileNode.php.

References $path.

235  {
236  $this->icon_path = $path;
237  }

◆ setId()

ilCloudFileNode::setId (   $id)
Parameters
$id

Definition at line 82 of file class.ilCloudFileNode.php.

References $id.

Referenced by __construct().

83  {
84  $this->id = $id;
85  }
+ Here is the caller graph for this function:

◆ setIsDir()

ilCloudFileNode::setIsDir (   $is_dir)
Parameters
$is_dir

Definition at line 186 of file class.ilCloudFileNode.php.

References $is_dir.

187  {
188  $this->is_dir = $is_dir;
189  }

◆ setLoadingComplete()

ilCloudFileNode::setLoadingComplete (   $complete)
Parameters
bool$complete

Definition at line 98 of file class.ilCloudFileNode.php.

99  {
100  $this->loading_complete = $complete;
101  }

◆ setMixed()

ilCloudFileNode::setMixed (   $mixed)
Parameters
mixed$mixed

Definition at line 250 of file class.ilCloudFileNode.php.

References $mixed.

251  {
252  $this->mixed = $mixed;
253  }

◆ setModified()

ilCloudFileNode::setModified (   $modified)
Parameters
$modified

Definition at line 218 of file class.ilCloudFileNode.php.

References $modified.

219  {
220  $this->modified = $modified;
221  }

◆ setParentId()

ilCloudFileNode::setParentId (   $id)
Parameters
$id

Definition at line 170 of file class.ilCloudFileNode.php.

References $id.

171  {
172  $this->parent_id = $id;
173  }

◆ setPath()

ilCloudFileNode::setPath (   $path = "/")
Parameters
string$path

Definition at line 114 of file class.ilCloudFileNode.php.

References $path, and ilCloudUtil\normalizePath().

Referenced by __construct().

115  {
116  $this->path = ilCloudUtil::normalizePath($path, $this->is_dir);
117  }
static normalizePath($path)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSize()

ilCloudFileNode::setSize (   $size)
Parameters
$size

Definition at line 202 of file class.ilCloudFileNode.php.

References $size, and size.

203  {
204  $this->size = $size;
205  }
Set page orientation and size
Definition: 04printing.php:77

Field Documentation

◆ $children

ilCloudFileNode::$children = array()
protected

Definition at line 33 of file class.ilCloudFileNode.php.

Referenced by getChildrenPathes().

◆ $created

ilCloudFileNode::$created = 0
protected

Definition at line 58 of file class.ilCloudFileNode.php.

◆ $icon_path

ilCloudFileNode::$icon_path = ""
protected

Definition at line 63 of file class.ilCloudFileNode.php.

Referenced by getIconPath().

◆ $id

ilCloudFileNode::$id = 0
protected

Definition at line 18 of file class.ilCloudFileNode.php.

Referenced by __construct(), getId(), setId(), and setParentId().

◆ $is_dir

ilCloudFileNode::$is_dir = false
protected

Definition at line 43 of file class.ilCloudFileNode.php.

Referenced by getIsDir(), and setIsDir().

◆ $loading_complete

ilCloudFileNode::$loading_complete = false
protected

Definition at line 38 of file class.ilCloudFileNode.php.

Referenced by getLoadingComplete().

◆ $mixed

ilCloudFileNode::$mixed
protected

Definition at line 68 of file class.ilCloudFileNode.php.

Referenced by getMixed(), and setMixed().

◆ $modified

ilCloudFileNode::$modified = 0
protected

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

Referenced by getModified(), and setModified().

◆ $parent_id

ilCloudFileNode::$parent_id = -1
protected

Definition at line 28 of file class.ilCloudFileNode.php.

Referenced by getParentId().

◆ $path

ilCloudFileNode::$path = ""
protected

◆ $size

ilCloudFileNode::$size = 0
protected

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

Referenced by getSize(), and setSize().


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