Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZAdCategory Class Reference

## Public Member Functions
| __construct ( $id=-1)
| store ()
| delete ()
| get ( $id=-1)
| getAll ()
| getByParent ( $parent)
| path ( $categoryID=0)
| getTree ( $parentID=0, $level=0)
| id ()
| name ( $html=true)
| description ( $html=true)
| parent ()
| excludeFromSearch ()
| setName ( $value)
| setDescription ( $value)
| setParent ( $value)
| setExcludeFromSearch ( $value)
| addAd ( $value)
& | adlist ( $sortMode="name", $fetchUnActive=false, $offset=0, $limit=50)
& | ads ( $sortMode="name", $fetchUnActive=false, $offset=0, $limit=50)

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

## Detailed Description

! eZAd eZAdCategory handles banner ad categories.

See also
  eZAd

TODO

Definition at line 43 of file ezadcategory.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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

Constructs a new eZAdCategory object.

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

Definition at line 51 of file ezadcategory.php.

References $ID, and $id.

## Member Function Documentation

## ◆ addAd()

eZAdCategory::addAd | ( |  | $value | ) |

Adds a ad to the category.

Definition at line 384 of file ezadcategory.php.

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

## ◆ adlist()

& eZAdCategory::adlist | ( |  | $sortMode = `"name"`,
|  |  | $fetchUnActive = `false`,
|  |  | $offset = `0`,
|  |  | $limit = `50`
| ) |  |

Returns every ad in a category as a array of eZAd objects.

It does not return unactive ads unless $fetchUnActive is set to true.

Definition at line 421 of file ezadcategory.php.

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

## ◆ ads()

& eZAdCategory::ads | ( |  | $sortMode = `"name"`,
|  |  | $fetchUnActive = `false`,
|  |  | $offset = `0`,
|  |  | $limit = `50`
| ) |  |

Returns every ad in a category as a array of eZAd objects.

It does not return unactive ads unless $fetchUnActive is set to true.

Definition at line 458 of file ezadcategory.php.

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

## ◆ delete()

eZAdCategory::delete | ( |  | ) |

Deletes a eZAdCategory object from the database.

Definition at line 110 of file ezadcategory.php.

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

## ◆ description()

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

Returns the group description.

Definition at line 298 of file ezadcategory.php.

References $Description.

## ◆ excludeFromSearch()

eZAdCategory::excludeFromSearch | ( |  | ) |

Returns true if the category is to be excluded from search, false if not.

Definition at line 325 of file ezadcategory.php.

References $ret.

## ◆ get()

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

Fetches the object information from the database.

Definition at line 140 of file ezadcategory.php.

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

## ◆ getAll()

eZAdCategory::getAll | ( |  | ) |

Returns all the categories found in the database.

The categories are returned as an array of eZAdCategory objects.

Definition at line 170 of file ezadcategory.php.

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

## ◆ getByParent()

eZAdCategory::getByParent | ( |  | $parent | ) |

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

The categories are returned as an array of eZAdCategory objects.

Definition at line 192 of file ezadcategory.php.

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

## ◆ getTree()

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

Definition at line 255 of file ezadcategory.php.

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

## ◆ id()

eZAdCategory::id | ( |  | ) |

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

Definition at line 279 of file ezadcategory.php.

References $ID.

## ◆ name()

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

Returns the name of the category.

Definition at line 288 of file ezadcategory.php.

References $Name, and Name.

## ◆ parent()

eZAdCategory::parent | ( |  | ) |

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

Definition at line 308 of file ezadcategory.php.

## ◆ path()

eZAdCategory::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 227 of file ezadcategory.php.

References $category, $categoryID, and $ID.

## ◆ setDescription()

eZAdCategory::setDescription | ( |  | $value | ) |

Sets the description of the category.

Definition at line 349 of file ezadcategory.php.

## ◆ setExcludeFromSearch()

eZAdCategory::setExcludeFromSearch | ( |  | $value | ) |

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

Definition at line 369 of file ezadcategory.php.

## ◆ setName()

eZAdCategory::setName | ( |  | $value | ) |

Sets the name of the category.

Definition at line 341 of file ezadcategory.php.

References Name.

## ◆ setParent()

eZAdCategory::setParent | ( |  | $value | ) |

Sets the parent category.

Definition at line 357 of file ezadcategory.php.

## ◆ store()

eZAdCategory::store | ( |  | ) |

Stores a eZAdCategory object to the database.

Definition at line 65 of file ezadcategory.php.

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

## Member Data Documentation

## ◆ $Description

eZAdCategory::$Description

Definition at line 507 of file ezadcategory.php.

Referenced by description().

## ◆ $ExcludeFromSearch

eZAdCategory::$ExcludeFromSearch

Definition at line 508 of file ezadcategory.php.

## ◆ $ID

eZAdCategory::$ID

Definition at line 504 of file ezadcategory.php.

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

## ◆ $Name

eZAdCategory::$Name

Definition at line 505 of file ezadcategory.php.

Referenced by name().

## ◆ $ParentID

eZAdCategory::$ParentID

Definition at line 506 of file ezadcategory.php.

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

- ezadcategory.php

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