Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZVirtualFolder Class Reference

## Public Member Functions
| __construct ( $id=-1)
| store ()
| getByName ( $dir, $parent=0, $create=false, $readgroup=-1, $writegroup=-1)
| delete ( $catID=-1)
| get ( $id=-1)
& | getAll ()
& | getByParent ( $parent)
& | path ( $categoryID=0)
& | getIDByParent ( $name, $parent=0)
& | getTree ( $parentID=0, $level=0)
| id ()
& | name ( $html=true)
& | description ( $html=false)
& | parent ()
& | user ( $asObject=true)
| setName ( $value)
| setSectionID ( $value)
| setDescription ( $value)
| setParent ( $value)
| setExcludeFromSearch ( $value)
| setUser (&$user)
| sectionID ()
| addFile (&$value)
& | files ( $sortMode="time", $offset=0, $limit=50)
| countFiles ()
| hasFile ( $file)

## Static Public Member Functions
static | isOwner ( $user, $folderID)
static | sectionIDStatic ($folderID)

## Public Attributes
| $ID
| $Name
| $ParentID
| $Description
| $UserID
| $SectionID
| $ExcludeFromSearch

## Detailed Description

! eZFileManager eZVirtualFolder manages virtual folders.

TODO

Definition at line 42 of file ezvirtualfolder.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZVirtualFolder::__construct | ( |  | $id = `-1` | ) |

Constructs a new eZVirtualFolder object.

If $id is set the object's values are fetched from the database.

Definition at line 50 of file ezvirtualfolder.php.

References $id, and $ID.

## Member Function Documentation

## ◆ addFile()

eZVirtualFolder::addFile | ( | & | $value | ) |

Adds a file to the folder.

Definition at line 518 of file ezvirtualfolder.php.

References $db, $query, $result, and eZDB\globalDatabase().

## ◆ countFiles()

eZVirtualFolder::countFiles | ( |  | ) |

Definition at line 581 of file ezvirtualfolder.php.

References $db, and eZDB\globalDatabase().

## ◆ delete()

eZVirtualFolder::delete | ( |  | $catID = `-1` | ) |

Deletes a eZVirtualFolder object from the database.

Definition at line 158 of file ezvirtualfolder.php.

References $category, $categoryList, $db, $file, $ID, $res, files(), eZDB\finish(), and eZDB\globalDatabase().

## ◆ description()

& eZVirtualFolder::description | ( |  | $html = `false` | ) |

Returns the group description.

Definition at line 373 of file ezvirtualfolder.php.

References $Description.

## ◆ files()

& eZVirtualFolder::files | ( |  | $sortMode = `"time"`,
|  |  | $offset = `0`,
|  |  | $limit = `50`
| ) |  |

Returns every files in a folder as a array of eZVirtualFile objects.

Definition at line 551 of file ezvirtualfolder.php.

References $db, $i, $limit, $offset, and eZDB\globalDatabase().

Referenced by delete().

## ◆ get()

eZVirtualFolder::get | ( |  | $id = `-1` | ) |

Fetches the object information from the database.

Definition at line 188 of file ezvirtualfolder.php.

References $category_array, $db, $id, eZDB\globalDatabase(), and Name.

## ◆ getAll()

& eZVirtualFolder::getAll | ( |  | ) |

Returns all the categories found in the database.

The categories are returned as an array of eZVirtualFolder objects.

Definition at line 216 of file ezvirtualfolder.php.

References $category_array, $db, $i, and eZDB\globalDatabase().

## ◆ getByName()

eZVirtualFolder::getByName | ( |  | $dir,
|  |  | $parent = `0`,
|  |  | $create = `false`,
|  |  | $readgroup = `-1`,
|  |  | $writegroup = `-1`
| ) |  |

Definition at line 107 of file ezvirtualfolder.php.

References $db, $dir, $folder, $group, $i, eZDB\globalDatabase(), and eZObjectPermission\setPermission().

Referenced by addFile(), and eZVirtualFile\fileExists().

## ◆ getByParent()

& eZVirtualFolder::getByParent | ( |  | $parent | ) |

Returns the categories with the category given as parameter as parent.

If $showAll is set to true every category is shown. By default the categories set as exclude from search is excluded from this query.

The categories are returned as an array of eZVirtualFolder objects.

Definition at line 241 of file ezvirtualfolder.php.

References $category_array, $db, $i, and eZDB\globalDatabase().

Referenced by getFilesAndFolders().

## ◆ getIDByParent()

& eZVirtualFolder::getIDByParent | ( |  | $name,
|  |  | $parent = `0`
| ) |  |

Definition at line 303 of file ezvirtualfolder.php.

References $db, $res, and eZDB\globalDatabase().

## ◆ getTree()

& eZVirtualFolder::getTree | ( |  | $parentID = `0`,
|  |  | $level = `0`
| ) |  |

Definition at line 324 of file ezvirtualfolder.php.

References $category, $categoryList, $level, $tree, $user, and eZUser\currentUser().

## ◆ hasFile()

eZVirtualFolder::hasFile | ( |  | $file | ) |

Returns true if file exists in this folder

Definition at line 601 of file ezvirtualfolder.php.

References $db, $file, $ret, and eZDB\globalDatabase().

## ◆ id()

eZVirtualFolder::id | ( |  | ) |

Returns the object ID to the category. This is the unique ID stored in the database.

Definition at line 352 of file ezvirtualfolder.php.

References $ID.

## ◆ isOwner()

static eZVirtualFolder::isOwner | ( |  | $user,
|  |  | $folderID
| ) |  |
| static

\Static Returns true if the given user is the owner of the given object. $user is either a userID or an eZUser. $folder is the virtual folder ID

Definition at line 421 of file ezvirtualfolder.php.

References $db, $res, $user, $userID, and eZDB\globalDatabase().

## ◆ name()

& eZVirtualFolder::name | ( |  | $html = `true` | ) |

Returns the name of the category.

Definition at line 361 of file ezvirtualfolder.php.

References $Name, and Name.

## ◆ parent()

& eZVirtualFolder::parent | ( |  | ) |

Returns the parent if one exist. If not 0 is returned.

Definition at line 385 of file ezvirtualfolder.php.

## ◆ path()

& eZVirtualFolder::path | ( |  | $categoryID = `0` | ) |

Returns the current path as an array of arrays.

The array is built up like: array( array( id, name ), array( id, name ) );

See detailed description for an example of usage.

Definition at line 275 of file ezvirtualfolder.php.

References $category, $categoryID, and $ID.

## ◆ sectionID()

eZVirtualFolder::sectionID | ( |  | ) |

Returns the Section ID. Returns false if the Folder was not found.

Definition at line 509 of file ezvirtualfolder.php.

References $SectionID.

## ◆ sectionIDStatic()

static eZVirtualFolder::sectionIDStatic | ( |  | $folderID | ) |
| static

Returns the Section ID. Returns false if the Folder was not found.

Definition at line 624 of file ezvirtualfolder.php.

References $db, $res, and eZDB\globalDatabase().

## ◆ setDescription()

eZVirtualFolder::setDescription | ( |  | $value | ) |

Sets the description of the category.

Definition at line 456 of file ezvirtualfolder.php.

## ◆ setExcludeFromSearch()

eZVirtualFolder::setExcludeFromSearch | ( |  | $value | ) |

Sets the exclude from search bit. The argumen can be true or false.

Definition at line 480 of file ezvirtualfolder.php.

## ◆ setName()

eZVirtualFolder::setName | ( |  | $value | ) |

Sets the name of the category.

Definition at line 439 of file ezvirtualfolder.php.

References Name.

## ◆ setParent()

eZVirtualFolder::setParent | ( |  | $value | ) |

Sets the parent category.

Definition at line 464 of file ezvirtualfolder.php.

## ◆ setSectionID()

eZVirtualFolder::setSectionID | ( |  | $value | ) |

Sets the section of the folder.

Definition at line 447 of file ezvirtualfolder.php.

## ◆ setUser()

eZVirtualFolder::setUser | ( | & | $user | ) |

Sets the user of the file.

Definition at line 496 of file ezvirtualfolder.php.

References $user, and $userID.

## ◆ store()

eZVirtualFolder::store | ( |  | ) |

Stores a eZVirtualFolder object to the database.

Definition at line 67 of file ezvirtualfolder.php.

References $db, $name, $result, eZDB\globalDatabase(), and Name.

## ◆ user()

& eZVirtualFolder::user | ( |  | $asObject = `true` | ) |

Returns a eZUser object.

Definition at line 400 of file ezvirtualfolder.php.

References $ret, and $UserID.

## Member Data Documentation

## ◆ $Description

eZVirtualFolder::$Description

Definition at line 645 of file ezvirtualfolder.php.

Referenced by description().

## ◆ $ExcludeFromSearch

eZVirtualFolder::$ExcludeFromSearch

Definition at line 648 of file ezvirtualfolder.php.

## ◆ $ID

eZVirtualFolder::$ID

Definition at line 642 of file ezvirtualfolder.php.

Referenced by __construct(), delete(), id(), and path().

## ◆ $Name

eZVirtualFolder::$Name

Definition at line 643 of file ezvirtualfolder.php.

Referenced by name().

## ◆ $ParentID

eZVirtualFolder::$ParentID

Definition at line 644 of file ezvirtualfolder.php.

## ◆ $SectionID

eZVirtualFolder::$SectionID

Definition at line 647 of file ezvirtualfolder.php.

Referenced by sectionID().

## ◆ $UserID

eZVirtualFolder::$UserID

Definition at line 646 of file ezvirtualfolder.php.

Referenced by user().

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

- ezvirtualfolder.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.