ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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.

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

References $path.

◆ getChildrenPathes()

ilCloudFileNode::getChildrenPathes ( )
Returns
array|null

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

151 {
152 if ($this->hasChildren()) {
153 return $this->children;
154 }
155 return null;
156 }

References $children, and hasChildren().

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

+ 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.

243 {
244 return $this->icon_path;
245 }

References $icon_path.

Referenced by ilCloudPluginFileTreeGUI\getItemHtml().

+ Here is the caller graph for this function:

◆ getId()

ilCloudFileNode::getId ( )
Returns
int

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

91 {
92 return $this->id;
93 }

References $id.

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

+ Here is the caller graph for this function:

◆ getIsDir()

ilCloudFileNode::getIsDir ( )
Returns
bool

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

195 {
196 return $this->is_dir;
197 }

References $is_dir.

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

+ Here is the caller graph for this function:

◆ getJSONEncode()

ilCloudFileNode::getJSONEncode ( )
Returns
array

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

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 }

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

+ Here is the call graph for this function:

◆ getLoadingComplete()

ilCloudFileNode::getLoadingComplete ( )
Returns
bool

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

107 {
109 }

References $loading_complete.

Referenced by getJSONEncode().

+ Here is the caller graph for this function:

◆ getMixed()

ilCloudFileNode::getMixed ( )
Returns
mixed

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

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

References $mixed.

◆ getModified()

ilCloudFileNode::getModified ( )
Returns
int

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

227 {
228 return $this->modified;
229 }

References $modified.

Referenced by ilCloudPluginFileTreeGUI\getItemHtml().

+ Here is the caller graph for this function:

◆ getParentId()

ilCloudFileNode::getParentId ( )
Returns
int

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

179 {
180 return $this->parent_id;
181 }

References $parent_id.

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

+ Here is the caller graph for this function:

◆ getPath()

ilCloudFileNode::getPath ( )
Returns
string

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

123 {
124 return $this->path;
125 }

References $path.

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

+ Here is the caller graph for this function:

◆ getSize()

ilCloudFileNode::getSize ( )
Returns
int

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

211 {
212 return $this->size;
213 }

References $size.

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

+ Here is the caller graph for this function:

◆ hasChildren()

ilCloudFileNode::hasChildren ( )
Returns
bool

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

162 {
163 return (count($this->children) > 0);
164 }

Referenced by getChildrenPathes().

+ Here is the caller graph for this function:

◆ removeChild()

ilCloudFileNode::removeChild (   $path)
Parameters
$path

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

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

References $path.

◆ setIconPath()

ilCloudFileNode::setIconPath (   $path)
Parameters
$path

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

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

References $path.

◆ setId()

ilCloudFileNode::setId (   $id)
Parameters
$id

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

83 {
84 $this->id = $id;
85 }

References $id.

Referenced by __construct().

+ 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.

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

References $is_dir.

◆ 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.

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

References $mixed.

◆ setModified()

ilCloudFileNode::setModified (   $modified)
Parameters
$modified

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

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

References $modified.

◆ setParentId()

ilCloudFileNode::setParentId (   $id)
Parameters
$id

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

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

References $id.

◆ setPath()

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

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

115 {
116 $this->path = ilCloudUtil::normalizePath($path, $this->is_dir);
117 }
static normalizePath($path)

References $path, and ilCloudUtil\normalizePath().

Referenced by __construct().

+ 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.

203 {
204 $this->size = $size;
205 }
font size
Definition: langcheck.php:162

References $size, and size.

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: