Open Journal Systems  3.3.0
ContextDAO Class Reference
Inheritance diagram for ContextDAO:
SchemaDAO DAO JournalDAO

Public Member Functions

 existsByPath ($path)
 
 getAll ($enabledOnly=false, $rangeInfo=null)
 
 getAvailable ($userId=null, $rangeInfo=null)
 
 getByPath ($path)
 
 getBySetting ($settingName, $settingValue, $contextId=null)
 
 getLocaleFieldNames ()
 
 getNames ($enabledOnly=false)
 
 resequence ()
 
- Public Member Functions inherited from SchemaDAO
 _fromRow ($primaryRow)
 
 deleteById ($objectId)
 
 deleteObject ($object)
 
 getById ($objectId)
 
 getInsertId ()
 
 insertObject ($object)
 
 newDataObject ()
 
 updateObject ($object)
 
- 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 ()
 
 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 SchemaDAO
 $primaryKeyColumn
 
 $primaryTableColumns = array()
 
 $schemaName
 
 $settingsTableName
 
 $tableName
 
- Data Fields inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table='', $id='')
 

Detailed Description

Operations for retrieving and modifying context objects.

See also
DAO

Definition at line 18 of file ContextDAO.inc.php.

Member Function Documentation

◆ existsByPath()

ContextDAO::existsByPath (   $path)

Check if a context exists with a specified path.

Parameters
$pathstring the path for the context
Returns
boolean

Definition at line 46 of file ContextDAO.inc.php.

References DAO\retrieve().

◆ getAll()

ContextDAO::getAll (   $enabledOnly = false,
  $rangeInfo = null 
)

Retrieve all contexts.

Parameters
$enabledOnlytrue iff only enabled contexts should be included
$rangeInfoObject optional
Returns
DAOResultFactory containing matching Contexts

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

References DAO\retrieveRange().

Referenced by getNames(), and JournalDAO\getTitles().

◆ getAvailable()

ContextDAO::getAvailable (   $userId = null,
  $rangeInfo = null 
)

Retrieve available contexts. If user-based contexts, retrieve all contexts assigned by user group or all contexts for site admin If not user-based, retrieve all enabled contexts.

Parameters
$userIdint Optional user ID to find available contexts for
$rangeInfoObject optional
Returns
DAOResultFactory containing matching Contexts

Definition at line 100 of file ContextDAO.inc.php.

References DAO\retrieveRange().

◆ getByPath()

ContextDAO::getByPath (   $path)

Retrieve a context by path.

Parameters
$pathstring
Returns
Context

Definition at line 61 of file ContextDAO.inc.php.

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

◆ getBySetting()

ContextDAO::getBySetting (   $settingName,
  $settingValue,
  $contextId = null 
)

Get journals by setting.

Parameters
$settingNamestring
$settingValuemixed
$contextIdint
Returns
DAOResultFactory

Definition at line 129 of file ContextDAO.inc.php.

References DAO\retrieve().

◆ getLocaleFieldNames()

ContextDAO::getLocaleFieldNames ( )

Get a list of localized settings.

Returns
array

Reimplemented from DAO.

Definition at line 37 of file ContextDAO.inc.php.

◆ getNames()

ContextDAO::getNames (   $enabledOnly = false)

Retrieve the IDs and names of all contexts in an associative array.

Parameters
$enabledOnlytrue iff only enabled contexts are to be included
Returns
array

Definition at line 24 of file ContextDAO.inc.php.

References getAll().

◆ resequence()

ContextDAO::resequence ( )

Sequentially renumber each context according to their sequence order.

Definition at line 148 of file ContextDAO.inc.php.

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


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