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

Public Member Functions

 _fromRow ($row)
 
 deleteByContextId ($contextId)
 
 deleteById ($socialMediaId, $contextId=null)
 
 deleteObject ($socialMedia)
 
 getByContextId ($contextId, $rangeInfo=null)
 
 getById ($socialMediaId, $contextId=null)
 
 getEnabledForCatalogByContextId ($contextId, $rangeInfo=null)
 
 getEnabledForContextByContextId ($contextId, $rangeInfo=null)
 
 getInsertId ()
 
 getLocaleFieldNames ()
 
 insertObject ($socialMedia)
 
 newDataObject ()
 
 PKPSocialMediaDAO ()
 
 updateLocaleFields ($socialMedia)
 
 updateObject ($socialMedia)
 
- 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 PKPSocialMedia objects.

See Also
PKPSocialMedia

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

Member Function Documentation

PKPSocialMediaDAO::_fromRow (   $row)

Internal function to return a SocialMedia object from a row.

Parameters
$rowarray
Returns
SocialMedia

Definition at line 67 of file PKPSocialMediaDAO.inc.php.

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

Referenced by getById().

PKPSocialMediaDAO::deleteByContextId (   $contextId)

Delete social media items by context ID NOTE: This does not delete dependent entries. It is intended to be called only when deleting a context.

Parameters
$contextIdint

Definition at line 189 of file PKPSocialMediaDAO.inc.php.

References deleteObject(), and getByContextId().

PKPSocialMediaDAO::deleteById (   $socialMediaId,
  $contextId = null 
)

Delete an object by ID.

Parameters
$socialMediaIdint
$contextIdint optional

Definition at line 164 of file PKPSocialMediaDAO.inc.php.

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

Referenced by deleteObject().

PKPSocialMediaDAO::deleteObject (   $socialMedia)

Delete an object.

Parameters
$socialMediaSocialMedia

Definition at line 152 of file PKPSocialMediaDAO.inc.php.

References deleteById().

Referenced by deleteByContextId().

PKPSocialMediaDAO::getByContextId (   $contextId,
  $rangeInfo = null 
)

Retrieve all media objects for a context.

Parameters
$contextIdint
Returns
DAOResultFactory containing SocialMedia objects

Definition at line 201 of file PKPSocialMediaDAO.inc.php.

References DAO\retrieveRange().

Referenced by deleteByContextId().

PKPSocialMediaDAO::getById (   $socialMediaId,
  $contextId = null 
)

Retrieve a media object by ID.

Parameters
$socialMediaIdint
$contextIdint optional
Returns
SocialMedia

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

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

PKPSocialMediaDAO::getEnabledForCatalogByContextId (   $contextId,
  $rangeInfo = null 
)

Retrieve the media objects for a context that are set to be used in the catalog.

Parameters
int$contextId
Returns
DAOResultFactory containing SocialMedia objects

Definition at line 221 of file PKPSocialMediaDAO.inc.php.

References DAO\retrieveRange().

PKPSocialMediaDAO::getEnabledForContextByContextId (   $contextId,
  $rangeInfo = null 
)

Retrieve the media objects for a context that are set to be used on the context home page.

Parameters
int$contextId
Returns
DAOResultFactory containing SocialMedia objects

Definition at line 241 of file PKPSocialMediaDAO.inc.php.

References DAO\retrieveRange().

PKPSocialMediaDAO::getInsertId ( )

Get the ID of the last inserted link.

Returns
int

Definition at line 260 of file PKPSocialMediaDAO.inc.php.

References DAO\_getInsertId().

Referenced by insertObject().

PKPSocialMediaDAO::getLocaleFieldNames ( )

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

Returns
array

Definition at line 86 of file PKPSocialMediaDAO.inc.php.

PKPSocialMediaDAO::insertObject (   $socialMedia)

Insert a new object.

Parameters
$socialMediaSocialMedia
Returns
int ID of the inserted link.

Definition at line 108 of file PKPSocialMediaDAO.inc.php.

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

PKPSocialMediaDAO::newDataObject ( )

Construct a new data object corresponding to this DAO.

Returns
PKPSocialMedia

Definition at line 58 of file PKPSocialMediaDAO.inc.php.

Referenced by _fromRow().

PKPSocialMediaDAO::PKPSocialMediaDAO ( )

Constructor

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

PKPSocialMediaDAO::updateLocaleFields (   $socialMedia)

Update the localized fields for this object.

Parameters
$socialMediaobject

Definition at line 94 of file PKPSocialMediaDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertObject(), and updateObject().

PKPSocialMediaDAO::updateObject (   $socialMedia)

Update an existing link.

Parameters
$socialMediaSocialMedia

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

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


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