Open Monograph Press  3.3.0
FeatureDAO Class Reference
Inheritance diagram for FeatureDAO:
DAO

Public Member Functions

 __construct ()
 
 deleteByAssoc ($assocType, $assocId)
 
 deleteByMonographId ($monographId)
 
 deleteFeature ($monographId, $assocType, $assocId)
 
 getFeaturedAll ($monographId)
 
 getMonographIdsByAssoc ($assocType, $assocId)
 
 getSequencePosition ($monographId, $assocType, $assocId)
 
 getSequencesByAssoc ($assocType, $assocId)
 
 insertFeature ($monographId, $assocType, $assocId, $seq)
 
 isFeatured ($monographId, $assocType, $assocId)
 
 resequenceByAssoc ($assocType, $assocId)
 
 setSequencePosition ($monographId, $assocType, $assocId, $sequencePosition)
 
- Public Member Functions inherited from DAO
 __construct ($dataSource=null, $callHooks=true)
 
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAdditionalFieldNames ()
 
 getAffectedRows ()
 
 getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject)
 
 getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getLocaleFieldNames ()
 
 getType ($value)
 
 handleError ($dataSource, $sql)
 
 nullOrInt ($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, $content='')
 
- Data Fields inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table='', $id='')
 

Detailed Description

Operations for setting Featured status on various items.

See also
Feature

Definition at line 17 of file FeatureDAO.inc.php.

Constructor & Destructor Documentation

◆ __construct()

FeatureDAO::__construct ( )

Constructor

Definition at line 21 of file FeatureDAO.inc.php.

Member Function Documentation

◆ deleteByAssoc()

FeatureDAO::deleteByAssoc (   $assocType,
  $assocId 
)

Delete a feature by association.

Parameters
$assocTypeint ASSOC_TYPE_...
$assocIdint

Definition at line 97 of file FeatureDAO.inc.php.

References DAO\update().

◆ deleteByMonographId()

FeatureDAO::deleteByMonographId (   $monographId)

Delete a feature by ID.

Parameters
$featureIdint
$pressIdint optional

Definition at line 85 of file FeatureDAO.inc.php.

References DAO\update().

◆ deleteFeature()

FeatureDAO::deleteFeature (   $monographId,
  $assocType,
  $assocId 
)

Delete a feature.

Parameters
$monographIdint
$assocTypeint ASSOC_TYPE_...
$assocIdint

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

References DAO\update().

◆ getFeaturedAll()

FeatureDAO::getFeaturedAll (   $monographId)

Return the monograph's featured settings in all assoc types

Parameters
$monographIdint The monograph id to get the feature state.
Returns
array

Definition at line 151 of file FeatureDAO.inc.php.

References DAO\retrieve().

◆ getMonographIdsByAssoc()

FeatureDAO::getMonographIdsByAssoc (   $assocType,
  $assocId 
)

Get monograph IDs by association.

Parameters
$assocTypeint ASSOC_TYPE_...
$assocIdint
Returns
array Associative array seq => monograph ID

Definition at line 31 of file FeatureDAO.inc.php.

References DAO\retrieve().

Referenced by getSequencesByAssoc().

◆ getSequencePosition()

FeatureDAO::getSequencePosition (   $monographId,
  $assocType,
  $assocId 
)

Get the current sequence position of the passed monograph id.

Parameters
$monographIdint The monograph id to check the sequence position.
$assocTypeint The monograph associated object type.
$assocIdint The monograph associated object id.
Returns
int or boolean The monograph sequence position or false if no monograph feature is set.

Definition at line 178 of file FeatureDAO.inc.php.

References DAO\retrieve().

◆ getSequencesByAssoc()

FeatureDAO::getSequencesByAssoc (   $assocType,
  $assocId 
)

Get feature sequences by association.

Parameters
$assocTypeint ASSOC_TYPE_...
$assocIdint
Returns
array Associative array monograph ID => seq

Definition at line 54 of file FeatureDAO.inc.php.

References getMonographIdsByAssoc().

◆ insertFeature()

FeatureDAO::insertFeature (   $monographId,
  $assocType,
  $assocId,
  $seq 
)

Insert a new feature.

Parameters
$monographIdint
$assocTypeint ASSOC_TYPE_...
$assocIdint
$seqint

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

References DAO\update().

◆ isFeatured()

FeatureDAO::isFeatured (   $monographId,
  $assocType,
  $assocId 
)

Check if the passed monograph id is featured on the passed associated object.

Parameters
$monographIdint The monograph id to check the feature state.
$assocTypeint The associated object type that the monograph is featured.
$assocIdint The associated object id that the monograph is featured.
Returns
boolean Whether or not the monograph is featured.

Definition at line 134 of file FeatureDAO.inc.php.

References DAO\retrieve().

◆ resequenceByAssoc()

FeatureDAO::resequenceByAssoc (   $assocType,
  $assocId 
)

Resequence features by association.

Parameters
$assocTypeint ASSOC_TYPE_...
$assocIdint per $assocType
$seqMonographIdif specified, sequence of monograph to return
Returns
array Associative array of id => seq for resequenced set

Definition at line 204 of file FeatureDAO.inc.php.

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

◆ setSequencePosition()

FeatureDAO::setSequencePosition (   $monographId,
  $assocType,
  $assocId,
  $sequencePosition 
)

Definition at line 190 of file FeatureDAO.inc.php.

References DAO\update().


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