Public Member Functions

CategoryDAO Class Reference
[Press]

Operations for retrieving and modifying Category objects. More...

List of all members.

Public Member Functions

 _fromRow (&$row)
 CategoryDAO ()
 categoryExistsByPath ($path)
 deleteById ($categoryId, $pressId=null)
 deleteByPressId ($pressId)
 deleteObject (&$category)
getById ($categoryId, $pressId=null, $parentId=null)
getByParentId ($parentId, $pressId=null, $rangeInfo=null)
getByPath ($path, $pressId)
getByPressId ($pressId, $rangeInfo=null)
getByTitle ($categoryTitle, $pressId, $locale=null)
getCountByPressId ($pressId)
 getInsertCategoryId ()
 getLocaleFieldNames ()
 insertObject (&$category)
 newDataObject ()
 updateLocaleFields (&$category)
 updateObject ($category)

Detailed Description

Operations for retrieving and modifying Category objects.

See also:
Category

Definition at line 19 of file CategoryDAO.inc.php.


Member Function Documentation

CategoryDAO._fromRow ( &$  row  ) 

Internal function to return an Category object from a row.

Parameters:
$row array
Returns:
Category

Definition at line 146 of file CategoryDAO.inc.php.

References newDataObject().

Referenced by getById(), getByPath(), and getByTitle().

CategoryDAO.CategoryDAO (  ) 

Constructor

Definition at line 23 of file CategoryDAO.inc.php.

CategoryDAO.categoryExistsByPath ( path  ) 

Check if a category exists with a specified path.

Parameters:
$path the path for the category
Returns:
boolean

Definition at line 121 of file CategoryDAO.inc.php.

CategoryDAO.deleteById ( categoryId,
pressId = null 
)

Delete an category by ID.

Parameters:
$categoryId int
$pressId int optional

Definition at line 247 of file CategoryDAO.inc.php.

Referenced by deleteObject().

CategoryDAO.deleteByPressId ( pressId  ) 

Delete category by press ID NOTE: This does not delete dependent entries. It is intended to be called only when deleting a press.

Parameters:
$pressId int

Definition at line 280 of file CategoryDAO.inc.php.

References deleteObject(), and getByPressId().

CategoryDAO.deleteObject ( &$  category  ) 

Delete an category.

Parameters:
$category Category

Definition at line 235 of file CategoryDAO.inc.php.

References deleteById().

Referenced by deleteByPressId().

& CategoryDAO.getById ( categoryId,
pressId = null,
parentId = null 
)

Retrieve an category by ID.

Parameters:
$categoryId int
$pressId int optional
$parentId int optional
Returns:
Category

Definition at line 34 of file CategoryDAO.inc.php.

References _fromRow().

& CategoryDAO.getByParentId ( parentId,
pressId = null,
rangeInfo = null 
)

Retrieve all categories for a parent category.

Returns:
DAOResultFactory containing Category ordered by sequence

Definition at line 330 of file CategoryDAO.inc.php.

& CategoryDAO.getByPath ( path,
pressId 
)

Retrieve a category by path.

Parameters:
$path string
$pressId int
Returns:
Category

Definition at line 65 of file CategoryDAO.inc.php.

References _fromRow().

& CategoryDAO.getByPressId ( pressId,
rangeInfo = null 
)

Retrieve all categories for a press.

Returns:
DAOResultFactory containing Category ordered by sequence

Definition at line 292 of file CategoryDAO.inc.php.

Referenced by deleteByPressId().

& CategoryDAO.getByTitle ( categoryTitle,
pressId,
locale = null 
)

Retrieve an category by title.

Parameters:
$categoryTitle string
$pressId int
$locale string optional
Returns:
Category

Definition at line 89 of file CategoryDAO.inc.php.

References _fromRow().

& CategoryDAO.getCountByPressId ( pressId  ) 

Retrieve the number of categories for a press.

Returns:
DAOResultFactory containing Category ordered by sequence

Definition at line 311 of file CategoryDAO.inc.php.

CategoryDAO.getInsertCategoryId (  ) 

Get the ID of the last inserted category.

Returns:
int

Definition at line 350 of file CategoryDAO.inc.php.

Referenced by insertObject().

CategoryDAO.getLocaleFieldNames (  ) 

Get the list of fields for which data can be localized.

Returns:
array

Definition at line 166 of file CategoryDAO.inc.php.

CategoryDAO.insertObject ( &$  category  ) 

Insert a new category.

Parameters:
$category Category
Returns:
int ID of the inserted category.

Definition at line 188 of file CategoryDAO.inc.php.

References getInsertCategoryId(), and updateLocaleFields().

CategoryDAO.newDataObject (  ) 

Construct a new data object corresponding to this DAO.

Returns:
Category

Definition at line 137 of file CategoryDAO.inc.php.

Referenced by _fromRow().

CategoryDAO.updateLocaleFields ( &$  category  ) 

Update the localized fields for this table

Parameters:
$category object

Definition at line 174 of file CategoryDAO.inc.php.

Referenced by insertObject(), and updateObject().

CategoryDAO.updateObject ( category  ) 

Update an existing category.

Parameters:
$category Category

Definition at line 211 of file CategoryDAO.inc.php.

References updateLocaleFields().


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