Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
SeriesDAO Class Reference
Inheritance diagram for SeriesDAO:
DAO

Public Member Functions

 _fromRow ($row)
 
 addCategory ($seriesId, $categoryId)
 
 categoryAssociationExists ($seriesId, $categoryId)
 
 deleteById ($seriesId, $pressId=null)
 
 deleteByPressId ($pressId)
 
 deleteObject ($series)
 
 getById ($seriesId, $pressId=null)
 
 getByPath ($path, $pressId)
 
 getByPressId ($pressId, $rangeInfo=null)
 
 getCategories ($seriesId, $pressId=null)
 
 getEditorSeries ($pressId)
 
 getInsertId ()
 
 getLocaleFieldNames ()
 
 getTitlesByPressId ($pressId, $submittableOnly=false)
 
 getUnassignedCategories ($seriesId, $pressId=null)
 
 insertObject ($series)
 
 newDataObject ()
 
 removeCategory ($seriesId, $categoryId)
 
 SeriesDAO ()
 
 seriesExists ($seriesId, $pressId)
 
 updateLocaleFields ($series)
 
 updateObject ($series)
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getType ($value)
 
 replace ($table, $arrFields, $keyCols)
 
retrieve ($sql, $params=false, $callHooks=true)
 
retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true)
 
retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
 
retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true)
 
 setCacheDir ()
 
 setDataSource (&$dataSource)
 
 update ($sql, $params=false, $callHooks=true, $dieOnError=true)
 
 updateDataObjectSettings ($tableName, &$dataObject, $idArray)
 

Additional Inherited Members

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null)
 
- Public Attributes inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table= '', $id= '')
 

Detailed Description

Operations for retrieving and modifying Series objects.

See Also
Series

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

Member Function Documentation

SeriesDAO::_fromRow (   $row)

Internal function to return an Series object from a row.

Parameters
$rowarray
Returns
Series

Definition at line 88 of file SeriesDAO.inc.php.

References HookRegistry\call(), and newDataObject().

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

SeriesDAO::addCategory (   $seriesId,
  $categoryId 
)

Associate a category with a series.

Parameters
$seriesIdint
$categoryIdint

Definition at line 328 of file SeriesDAO.inc.php.

References DAO\update().

SeriesDAO::categoryAssociationExists (   $seriesId,
  $categoryId 
)

Check if an series exists with the specified ID.

Parameters
$seriesIdint
$pressIdint
Returns
boolean

Definition at line 413 of file SeriesDAO.inc.php.

References DAO\retrieve().

SeriesDAO::deleteById (   $seriesId,
  $pressId = null 
)

Delete an series by ID.

Parameters
$seriesIdint
$pressIdint optional

Definition at line 191 of file SeriesDAO.inc.php.

References DAORegistry\getDAO(), seriesExists(), and DAO\update().

Referenced by deleteObject().

SeriesDAO::deleteByPressId (   $pressId)

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

Parameters
$pressIdint

Definition at line 213 of file SeriesDAO.inc.php.

References deleteObject(), and getByPressId().

SeriesDAO::deleteObject (   $series)

Delete an series.

Parameters
$seriesSeries

Definition at line 182 of file SeriesDAO.inc.php.

References deleteById().

Referenced by deleteByPressId().

SeriesDAO::getById (   $seriesId,
  $pressId = null 
)

Retrieve an series by ID.

Parameters
$seriesIdint
$pressIdint optional
Returns
Series

Definition at line 33 of file SeriesDAO.inc.php.

References _fromRow(), and DAO\retrieve().

SeriesDAO::getByPath (   $path,
  $pressId 
)

Retrieve a series by path.

Parameters
$pathstring
$pressIdint
Returns
Series

Definition at line 60 of file SeriesDAO.inc.php.

References _fromRow(), and DAO\retrieve().

SeriesDAO::getByPressId (   $pressId,
  $rangeInfo = null 
)

Retrieve all series for a press.

Returns
DAOResultFactory containing Series ordered by sequence

Definition at line 257 of file SeriesDAO.inc.php.

References AppLocale\getLocale(), AppLocale\getPrimaryLocale(), and DAO\retrieveRange().

Referenced by deleteByPressId(), and getTitlesByPressId().

SeriesDAO::getCategories (   $seriesId,
  $pressId = null 
)

Get the categories associated with a given series.

Parameters
$seriesIdint
Returns
DAOResultFactory

Definition at line 361 of file SeriesDAO.inc.php.

References DAORegistry\getDAO(), and DAO\retrieve().

SeriesDAO::getEditorSeries (   $pressId)

Retrieve an array associating all series editor IDs with arrays containing the series they edit.

Returns
array editorId => array(series they edit)

Definition at line 225 of file SeriesDAO.inc.php.

References _fromRow(), and DAO\retrieve().

SeriesDAO::getInsertId ( )

Get the ID of the last inserted series.

Returns
int

Definition at line 319 of file SeriesDAO.inc.php.

References DAO\_getInsertId().

Referenced by insertObject().

SeriesDAO::getLocaleFieldNames ( )

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

Returns
array

Definition at line 110 of file SeriesDAO.inc.php.

SeriesDAO::getTitlesByPressId (   $pressId,
  $submittableOnly = false 
)

Retrieve the IDs and titles of the series for a press in an associative array.

Returns
array

Definition at line 281 of file SeriesDAO.inc.php.

References getByPressId().

SeriesDAO::getUnassignedCategories (   $seriesId,
  $pressId = null 
)

Get the categories not associated with a given series.

Parameters
$seriesIdint
Returns
DAOResultFactory

Definition at line 387 of file SeriesDAO.inc.php.

References DAORegistry\getDAO(), and DAO\retrieve().

SeriesDAO::insertObject (   $series)

Insert a new series.

Parameters
$seriesSeries

Definition at line 130 of file SeriesDAO.inc.php.

References getInsertId(), DAO\update(), and updateLocaleFields().

SeriesDAO::newDataObject ( )

Construct a new data object corresponding to this DAO.

Returns
Series

Definition at line 79 of file SeriesDAO.inc.php.

Referenced by _fromRow().

SeriesDAO::removeCategory (   $seriesId,
  $categoryId 
)

Unassociate a category with a series.

Parameters
$seriesIdint
$categoryIdint

Definition at line 346 of file SeriesDAO.inc.php.

References DAO\update().

SeriesDAO::SeriesDAO ( )

Constructor

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

SeriesDAO::seriesExists (   $seriesId,
  $pressId 
)

Check if an series exists with the specified ID.

Parameters
$seriesIdint
$pressIdint
Returns
boolean

Definition at line 304 of file SeriesDAO.inc.php.

References DAO\retrieve().

Referenced by deleteById().

SeriesDAO::updateLocaleFields (   $series)

Update the localized fields for this table

Parameters
$seriesobject

Definition at line 118 of file SeriesDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertObject(), and updateObject().

SeriesDAO::updateObject (   $series)

Update an existing series.

Parameters
$seriesSeries

Definition at line 155 of file SeriesDAO.inc.php.

References DAO\update(), and updateLocaleFields().


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