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
eZImageCategory Class Reference

## Public Member Functions
| __construct ( $id=-1)
| store ()
& | search ( $name, $literal=false, $sortby='name', $user=false)
| delete ( $catID=-1)
| get ( $id=-1)
& | getImages ( $user, $category=false)
| countByParent ( $parent)
| getByParent ( $parent, $offset=0, $max=-1)
| path ( $categoryID=0)
| getTree ( $parentID=0, $level=0)
| id ()
| name ( $html=true)
| description ( $html=true)
| parent ( $as_object=true)
| user ()
| setName ( $value)
| setDescription ( $value)
| setParent ( $value)
| setUser ( $user)
| imageCount ( $check_write=false)
| images ( $sortMode="time", $offset=0, $limit=-1, $category=false, $check_write=false)
| setSectionID ( $value)
| sectionID ()

## Static Public Member Functions
static | getAll ( $limit=false, $offset=0)
& | getByName ( $name)
static | isOwner ( $user, $imageCategory=false)
static | addImage ( $value, $categoryid=false)
static | removeImage ( $value, $categoryid=false)
static | sectionIDStatic ( $categoryID)

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

## Detailed Description

! eZImageCatalogue eZImageCategory manages virtual folders.

TODO

Definition at line 42 of file ezimagecategory.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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

Constructs a new eZImageCategory object.

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

Definition at line 50 of file ezimagecategory.php.

References $id, and $ID.

## Member Function Documentation

## ◆ addImage()

static eZImageCategory::addImage | ( |  | $value,
|  |  | $categoryid = `false`
| ) |  |
| static

Adds a file to the category. Can be used as a static function if $categoryid is supplied

Definition at line 547 of file ezimagecategory.php.

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

Referenced by syncDir().

## ◆ countByParent()

eZImageCategory::countByParent | ( |  | $parent | ) |

Returns the number of categories in the the category given as parameter as parent.

Definition at line 271 of file ezimagecategory.php.

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

## ◆ delete()

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

Deletes a eZImageCategory object from the database.

Definition at line 168 of file ezimagecategory.php.

References $category, $categoryID, $categoryList, $db, $ID, $image, eZDB\globalDatabase(), and images().

## ◆ description()

eZImageCategory::description | ( |  | $html = `true` | ) |

Returns the group description.

Definition at line 435 of file ezimagecategory.php.

References $Description, and eZTextTool\fixhtmlentities().

## ◆ get()

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

Fetches the object information from the database.

Definition at line 207 of file ezimagecategory.php.

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

## ◆ getAll()

static eZImageCategory::getAll | ( |  | $limit = `false`,
|  |  | $offset = `0`
| ) |  |
| static

Returns all the categories found in the database.

The categories are returned as an array of eZImageCategory objects.

Definition at line 237 of file ezimagecategory.php.

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

## ◆ getByName()

& eZImageCategory::getByName | ( |  | $name | ) |
| static

Returns the one, and only if one exists, category with the name

Returns an object of eZImageCategory.

Definition at line 333 of file ezimagecategory.php.

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

## ◆ getByParent()

eZImageCategory::getByParent | ( |  | $parent,
|  |  | $offset = `0`,
|  |  | $max = `-1`
| ) |  |

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 eZImageCategory objects.

Definition at line 298 of file ezimagecategory.php.

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

Referenced by categoryTree().

## ◆ getImages()

& eZImageCategory::getImages | ( |  | $user,
|  |  | $category = `false`
| ) |  |

\Static Returns all images in a category

Definition at line 263 of file ezimagecategory.php.

References $category, and images().

Referenced by eZSlideshow\get().

## ◆ getTree()

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

Recursive function that returns an array containing an int (tree position) and an array ( all items on that level )

Definition at line 391 of file ezimagecategory.php.

References $category, $categoryList, $level, and $tree.

## ◆ id()

eZImageCategory::id | ( |  | ) |

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

Definition at line 415 of file ezimagecategory.php.

References $ID.

## ◆ imageCount()

eZImageCategory::imageCount | ( |  | $check_write = `false` | ) |

Returns every images in a category as a array of eZImage objects.

Definition at line 622 of file ezimagecategory.php.

References $db, $group, $groups, $i, $ini, $limit, $user, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ images()

eZImageCategory::images | ( |  | $sortMode = `"time"`,
|  |  | $offset = `0`,
|  |  | $limit = `-1`,
|  |  | $category = `false`,
|  |  | $check_write = `false`
| ) |  |

Returns every images in a category as a array of eZImage objects.

Definition at line 720 of file ezimagecategory.php.

References $category, $db, $group, $groups, $i, $ID, $limit, $offset, $user, eZUser\currentUser(), and eZDB\globalDatabase().

Referenced by delete(), and getImages().

## ◆ isOwner()

static eZImageCategory::isOwner | ( |  | $user,
|  |  | $imageCategory = `false`
| ) |  |
| static

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

Definition at line 480 of file ezimagecategory.php.

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

## ◆ name()

eZImageCategory::name | ( |  | $html = `true` | ) |

Returns the name of the category.

Definition at line 423 of file ezimagecategory.php.

References $Name, eZTextTool\fixhtmlentities(), and Name.

## ◆ parent()

eZImageCategory::parent | ( |  | $as_object = `true` | ) |

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

Definition at line 447 of file ezimagecategory.php.

References $ParentID.

## ◆ path()

eZImageCategory::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 360 of file ezimagecategory.php.

References $category, $categoryID, and $ID.

## ◆ removeImage()

static eZImageCategory::removeImage | ( |  | $value,
|  |  | $categoryid = `false`
| ) |  |
| static

Removes an image from the category. Can be used as a static function if $categoryid is supplied

Definition at line 594 of file ezimagecategory.php.

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

## ◆ search()

& eZImageCategory::search | ( |  | $name,
|  |  | $literal = `false`,
|  |  | $sortby = `'name'`,
|  |  | $user = `false`
| ) |  |

Definition at line 103 of file ezimagecategory.php.

References $author, $currentUserID, $db, $group, $groups, $i, $name, $query, $topic, $user, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ sectionID()

eZImageCategory::sectionID | ( |  | ) |

Returns the section of the category

Definition at line 830 of file ezimagecategory.php.

References $SectionID.

## ◆ sectionIDStatic()

static eZImageCategory::sectionIDStatic | ( |  | $categoryID | ) |
| static

Definition at line 835 of file ezimagecategory.php.

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

Referenced by categoryTree().

## ◆ setDescription()

eZImageCategory::setDescription | ( |  | $value | ) |

Sets the description of the category.

Definition at line 513 of file ezimagecategory.php.

## ◆ setName()

eZImageCategory::setName | ( |  | $value | ) |

Sets the name of the category.

Definition at line 505 of file ezimagecategory.php.

References Name.

## ◆ setParent()

eZImageCategory::setParent | ( |  | $value | ) |

Sets the parent category.

Definition at line 521 of file ezimagecategory.php.

## ◆ setSectionID()

eZImageCategory::setSectionID | ( |  | $value | ) |

Sets the section of the category

Definition at line 822 of file ezimagecategory.php.

## ◆ setUser()

eZImageCategory::setUser | ( |  | $user | ) |

Sets the user of the file.

Definition at line 532 of file ezimagecategory.php.

References $user, and $userID.

## ◆ store()

eZImageCategory::store | ( |  | ) |

Stores a eZImageCategory object to the database.

Definition at line 63 of file ezimagecategory.php.

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

## ◆ user()

eZImageCategory::user | ( |  | ) |

Returns a eZUser object.

Definition at line 465 of file ezimagecategory.php.

References $ret.

## Member Data Documentation

## ◆ $Description

eZImageCategory::$Description

Definition at line 863 of file ezimagecategory.php.

Referenced by description().

## ◆ $ExcludeFromSearch

eZImageCategory::$ExcludeFromSearch

Definition at line 866 of file ezimagecategory.php.

## ◆ $ID

eZImageCategory::$ID

Definition at line 860 of file ezimagecategory.php.

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

## ◆ $Name

eZImageCategory::$Name

Definition at line 861 of file ezimagecategory.php.

Referenced by name().

## ◆ $ParentID

eZImageCategory::$ParentID

Definition at line 862 of file ezimagecategory.php.

Referenced by parent().

## ◆ $SectionID

eZImageCategory::$SectionID

Definition at line 865 of file ezimagecategory.php.

Referenced by sectionID().

## ◆ $UserID

eZImageCategory::$UserID

Definition at line 864 of file ezimagecategory.php.

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

- ezimagecategory.php

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