ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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

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

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

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

{
$this->setPath($path);
$this->setId($id);
}

+ Here is the call graph for this function:

Member Function Documentation

ilCloudFileNode::addChild (   $path)
Parameters
$path

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

References $path.

{
if (!isset($this->children[$path]))
{
$this->children[$path] = $path;
}
}
ilCloudFileNode::getChildrenPathes ( )
Returns
array|null

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

References $children, and hasChildren().

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

{
if ($this->hasChildren())
{
}
return null;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCloudFileNode::getIconPath ( )
Returns
string

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

References $icon_path.

Referenced by ilCloudPluginFileTreeGUI\getItemHtml().

{
}

+ Here is the caller graph for this function:

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().

{
return $this->id;
}

+ Here is the caller graph for this function:

ilCloudFileNode::getIsDir ( )
Returns
bool

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

References $is_dir.

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

{
return $this->is_dir;
}

+ Here is the caller graph for this function:

ilCloudFileNode::getJSONEncode ( )
Returns
array

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

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

{
$node = array();
$node["id"] = $this->getId();
$node["is_dir"] = $this->getIsDir();
$node["path"] = $this->getPath();
$node["parent_id"] = $this->getParentId();
$node["loading_complete"] = $this->getLoadingComplete();
$node["children"] = $this->getChildrenPathes();
$node["size"] = $this->getSize();
return $node;
}

+ Here is the call graph for this function:

ilCloudFileNode::getLoadingComplete ( )
Returns
bool

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

References $loading_complete.

Referenced by getJSONEncode().

+ Here is the caller graph for this function:

ilCloudFileNode::getMixed ( )
Returns
mixed

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

References $mixed.

{
return $this->mixed;
}
ilCloudFileNode::getModified ( )
Returns
int

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

References $modified.

Referenced by ilCloudPluginFileTreeGUI\getItemHtml().

{
}

+ Here is the caller graph for this function:

ilCloudFileNode::getParentId ( )
Returns
int

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

References $parent_id.

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

{
}

+ Here is the caller graph for this function:

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().

{
return $this->path;
}

+ Here is the caller graph for this function:

ilCloudFileNode::getSize ( )
Returns
int

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

References $size.

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

{
return $this->size;
}

+ Here is the caller graph for this function:

ilCloudFileNode::hasChildren ( )
Returns
bool

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

Referenced by getChildrenPathes().

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

+ Here is the caller graph for this function:

ilCloudFileNode::removeChild (   $path)
Parameters
$path

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

References $path.

{
if (isset($this->children[$path]))
{
unset($this->children[$path]);
}
}
ilCloudFileNode::setIconPath (   $path)
Parameters
$path

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

References $path.

{
$this->icon_path = $path;
}
ilCloudFileNode::setId (   $id)
Parameters
$id

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

References $id.

Referenced by __construct().

{
$this->id = $id;
}

+ Here is the caller graph for this function:

ilCloudFileNode::setIsDir (   $is_dir)
Parameters
$is_dir

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

References $is_dir.

{
$this->is_dir = $is_dir;
}
ilCloudFileNode::setLoadingComplete (   $complete)
Parameters
bool$complete

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

{
$this->loading_complete = $complete;
}
ilCloudFileNode::setMixed (   $mixed)
Parameters
mixed$mixed

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

References $mixed.

{
$this->mixed = $mixed;
}
ilCloudFileNode::setModified (   $modified)
Parameters
$modified

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

References $modified.

{
$this->modified = $modified;
}
ilCloudFileNode::setParentId (   $id)
Parameters
$id

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

References $id.

{
$this->parent_id = $id;
}
ilCloudFileNode::setPath (   $path = "/")
Parameters
string$path

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

References $path, and ilCloudUtil\normalizePath().

Referenced by __construct().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCloudFileNode::setSize (   $size)
Parameters
$size

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

References $size.

{
$this->size = $size;
}

Field Documentation

ilCloudFileNode::$children = array()
protected

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

Referenced by getChildrenPathes().

ilCloudFileNode::$created = 0
protected

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

ilCloudFileNode::$icon_path = ""
protected

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

Referenced by getIconPath().

ilCloudFileNode::$id = 0
protected

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

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

ilCloudFileNode::$is_dir = false
protected

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

Referenced by getIsDir(), and setIsDir().

ilCloudFileNode::$loading_complete = false
protected

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

Referenced by getLoadingComplete().

ilCloudFileNode::$mixed
protected

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

Referenced by getMixed(), and setMixed().

ilCloudFileNode::$modified = 0
protected

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

Referenced by getModified(), and setModified().

ilCloudFileNode::$parent_id = -1
protected

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

Referenced by getParentId().

ilCloudFileNode::$path = ""
protected
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: