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

Public Member Functions

 Context ()
 
 getAcronym ($locale)
 
 getAssocType ()
 
 getContactEmail ()
 
 getContactName ()
 
 getDefaultMetricType ()
 
 getDescription ($locale=null)
 
 getEnabled ()
 
 getLocalizedAcronym ()
 
 getLocalizedDescription ()
 
 getLocalizedName ($preferredLocale=null)
 
getLocalizedSetting ($name)
 
 getMetrics ($metricType=null, $columns=array(), $filter=array(), $orderBy=array(), $range=null)
 
 getMetricTypes ($withDisplayNames=false)
 
 getName ($locale=null)
 
 getPath ()
 
 getPrimaryLocale ()
 
 getSequence ()
 
getSetting ($name, $locale=null)
 
getSettings ()
 
 getSupportedFormLocaleNames ()
 
 getSupportedFormLocales ()
 
 getSupportedLocaleNames ()
 
 getSupportedLocales ()
 
 getSupportedSubmissionLocaleNames ()
 
 getSupportedSubmissionLocales ()
 
 getViews ()
 
 setContactEmail ($contactEmail)
 
 setContactName ($contactName)
 
 setDescription ($description, $locale=null)
 
 setEnabled ($enabled)
 
 setName ($name, $locale=null)
 
 setPath ($path)
 
 setPrimaryLocale ($primaryLocale)
 
 setSequence ($sequence)
 
 updateSetting ($name, $value, $type=null, $isLocalized=false)
 
- Public Member Functions inherited from DataObject
 addSupportedMetadataAdapter ($metadataAdapter)
 
 DataObject ()
 
 extractMetadata ($metadataSchema)
 
 getAdditionalMetadataFieldNames ()
 
getAllData ()
 
getData ($key, $locale=null)
 
 getHasLoadableAdapters ()
 
 getId ()
 
 getLocaleMetadataFieldNames ()
 
getLocalizedData ($key)
 
 getMetadataFieldNames ($translated=true)
 
 getSetMetadataFieldNames ($translated=true)
 
 getSupportedExtractionAdapters ()
 
 getSupportedInjectionAdapters ()
 
 getSupportedMetadataSchemas ()
 
 hasData ($key, $locale=null)
 
 injectMetadata ($metadataDescription)
 
 removeSupportedMetadataAdapter ($metadataSchemaName)
 
 setAllData (&$data)
 
 setData ($key, $value, $locale=null)
 
 setHasLoadableAdapters ($hasLoadableAdapters)
 
 setId ($id)
 
 upcastTo ($targetObject)
 

Static Public Member Functions

static getDAO ()
 
static getSettingsDAO ()
 

Additional Inherited Members

- Public Attributes inherited from DataObject
 $_data = array()
 
 $_extractionAdaptersLoaded = false
 
 $_hasLoadableAdapters = false
 
 $_injectionAdaptersLoaded = false
 
 $_metadataExtractionAdapters = array()
 
 $_metadataInjectionAdapters = array()
 

Detailed Description

Basic class describing a context.

Definition at line 16 of file Context.inc.php.

Member Function Documentation

Context::Context ( )

Constructor

Definition at line 20 of file Context.inc.php.

Context::getAcronym (   $locale)

Get the acronym of the context.

Parameters
$localestring
Returns
string

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

References getSetting().

Context::getAssocType ( )

Get the association type for this context.

Returns
int

Definition at line 290 of file Context.inc.php.

Context::getContactEmail ( )

Get the contact email for this context

Returns
string

Definition at line 68 of file Context.inc.php.

References getSetting().

Context::getContactName ( )

Get the contact name for this context

Returns
string

Definition at line 52 of file Context.inc.php.

References getSetting().

static Context::getDAO ( )
static

Get the DAO for this context object.

Returns
DAO

Definition at line 306 of file Context.inc.php.

Context::getDefaultMetricType ( )

Returns the currently configured default metric type for this context. If no specific metric type has been set for this context then the site-wide default metric type will be returned.

Returns
null|string A metric type identifier or null if no default metric type could be identified.

Definition at line 404 of file Context.inc.php.

References getMetricTypes(), and getSetting().

Context::getDescription (   $locale = null)

Get context description.

Parameters
$descriptionstring optional
Returns
string

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

References DataObject\getData().

Context::getEnabled ( )

Get enabled flag of context

Returns
int

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

References DataObject\getData().

Context::getLocalizedAcronym ( )

Get localized acronym of context

Returns
string

Definition at line 173 of file Context.inc.php.

References getLocalizedSetting().

Context::getLocalizedDescription ( )

Get the localized description of the context.

Returns
string

Definition at line 165 of file Context.inc.php.

References getLocalizedSetting().

Context::getLocalizedName (   $preferredLocale = null)

Get the localized name of the context

Parameters
$preferredLocalestring
Returns
string

Definition at line 29 of file Context.inc.php.

References getLocalizedSetting().

& Context::getLocalizedSetting (   $name)

Get a localized context setting by name.

Parameters
$namestring
Returns
mixed

Definition at line 349 of file Context.inc.php.

References AppLocale\getLocale(), AppLocale\getPrimaryLocale(), and getSetting().

Referenced by getLocalizedAcronym(), getLocalizedDescription(), and getLocalizedName().

Context::getMetrics (   $metricType = null,
  $columns = array(),
  $filter = array(),
  $orderBy = array(),
  $range = null 
)

Retrieve a statistics report pre-filtered on this context.

See Also
http://pkp.sfu.ca/wiki/index.php/OJSdeStatisticsConcept#Input_and_Output_Formats_.28Aggregation.2C_Filters.2C_Metrics_Data.29 for a full specification of the input and output format of this method.
Parameters
$metricTypenull|integer|array metrics selection
$columnsinteger|array column (aggregation level) selection
$filtersarray report-level filter selection
$orderByarray order criteria
$rangenull|DBResultRange paging specification
Returns
null|array The selected data as a simple tabular result set or null if metrics are not supported by this context.

Definition at line 440 of file Context.inc.php.

References DataObject\getId().

Context::getMetricTypes (   $withDisplayNames = false)

Return all metric types supported by this context.

Returns
array An array of strings of supported metric type identifiers.

Definition at line 375 of file Context.inc.php.

References DataObject\getId(), and PluginRegistry\loadCategory().

Referenced by getDefaultMetricType().

Context::getName (   $locale = null)

get the name of the context

Definition at line 44 of file Context.inc.php.

References getSetting().

Context::getPath ( )

Get path to context (in URL).

Returns
string

Definition at line 102 of file Context.inc.php.

References DataObject\getData().

Context::getPrimaryLocale ( )

Return the primary locale of this context.

Returns
string

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

References DataObject\getData().

Context::getSequence ( )

Get sequence of context in site-wide list.

Returns
float

Definition at line 149 of file Context.inc.php.

References DataObject\getData().

& Context::getSetting (   $name,
  $locale = null 
)
& Context::getSettings ( )

Retrieve array of settings.

Returns
array

Definition at line 314 of file Context.inc.php.

References DataObject\getId(), and getSettingsDAO().

static Context::getSettingsDAO ( )
static

Get the settings DAO for this context object.

Returns
DAO

Definition at line 298 of file Context.inc.php.

Referenced by getSetting(), getSettings(), and updateSetting().

Context::getSupportedFormLocaleNames ( )

Return associative array of all locales supported by forms on the site. These locales are used to provide a language toggle on the main site pages.

Returns
array

Definition at line 199 of file Context.inc.php.

References PKPLocale\getAllLocales(), DataObject\getData(), and getSupportedFormLocales().

Context::getSupportedFormLocales ( )

Get the supported form locales.

Returns
array

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

References getSetting().

Referenced by getSupportedFormLocaleNames().

Context::getSupportedLocaleNames ( )

Return associative array of all locales supported by the site. These locales are used to provide a language toggle on the main site pages.

Returns
array

Definition at line 266 of file Context.inc.php.

References PKPLocale\getAllLocales(), DataObject\getData(), and getSupportedLocales().

Context::getSupportedLocales ( )

Get the supported locales.

Returns
array

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

References getSetting().

Referenced by getSupportedLocaleNames().

Context::getSupportedSubmissionLocaleNames ( )

Return associative array of all locales supported by submissions on the site. These locales are used to provide a language toggle on the main site pages.

Returns
array

Definition at line 233 of file Context.inc.php.

References PKPLocale\getAllLocales(), DataObject\getData(), and getSupportedSubmissionLocales().

Context::getSupportedSubmissionLocales ( )

Get the supported submission locales.

Returns
array

Definition at line 223 of file Context.inc.php.

References getSetting().

Referenced by getSupportedSubmissionLocaleNames().

Context::getViews ( )

Get context main page views.

Returns
int

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

References Application\getContextAssocType(), and DataObject\getId().

Context::setContactEmail (   $contactEmail)

Set the contact email for this context

Parameters
$contactEmailstring

Definition at line 76 of file Context.inc.php.

References DataObject\setData().

Context::setContactName (   $contactName)

Set the contact name for this context

Parameters
$contactNamestring

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

References DataObject\setData().

Context::setDescription (   $description,
  $locale = null 
)

Set context description.

Parameters
$descriptionstring
$localestring optional

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

References DataObject\setData().

Context::setEnabled (   $enabled)

Set enabled flag of context

Parameters
$enabledint

Definition at line 126 of file Context.inc.php.

References DataObject\setData().

Context::setName (   $name,
  $locale = null 
)

Set the name of the context

Parameters
$namestring

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

References DataObject\setData().

Context::setPath (   $path)

Set path to context (in URL).

Parameters
$pathstring

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

References DataObject\setData().

Context::setPrimaryLocale (   $primaryLocale)

Set the primary locale of this context.

Parameters
$localestring

Definition at line 142 of file Context.inc.php.

References DataObject\setData().

Context::setSequence (   $sequence)

Set sequence of context in site table of contents.

Parameters
$sequencefloat

Definition at line 157 of file Context.inc.php.

References DataObject\setData().

Context::updateSetting (   $name,
  $value,
  $type = null,
  $isLocalized = false 
)

Update a context setting value.

Parameters
$namestring
$valuemixed
$typestring optional
$isLocalizedboolean optional

Definition at line 339 of file Context.inc.php.

References DataObject\getId(), and getSettingsDAO().


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