Open Journal Systems
3.3.0
|
Public Member Functions | |
add ($context, $request) | |
delete ($context) | |
edit ($context, $params, $request) | |
get ($contextId) | |
getCount ($args=[]) | |
getFullProperties ($context, $args=null) | |
getIds ($args=[]) | |
getMany ($args=array()) | |
getManySummary ($args=[]) | |
getMax ($args=array()) | |
getProperties ($context, $props, $args=null) | |
getQueryBuilder ($args=array()) | |
getSummaryProperties ($context, $args=null) | |
moveTemporaryFile ($context, $temporaryFile, $fileNameBase, $userId, $localeKey='') | |
restoreLocaleDefaults ($context, $request, $locale) | |
validate ($action, $props, $allowedLocales, $primaryLocale) | |
Data Fields | |
$contextsFileDirName | |
$installFileDirs | |
Protected Member Functions | |
_saveFileParam ($context, $value, $settingName, $userId, $localeKey='', $isImage=false) | |
Definition at line 30 of file PKPContextService.inc.php.
|
protected |
Handle a context setting for an uploaded file
This method is protected because all operations which edit contexts should go through the add and edit methods in order to ensure that the appropriate hooks are fired.
$context | Context The context being edited |
$value | mixed The param value to be saved. Contains the temporary file ID if a new file has been uploaded. |
$settingName | string The name of the setting to save, typically used in the filename. |
$userId | integer ID of the user who owns the temporary file |
$localeKey | string Optional. Used in the filename for multilingual properties. |
$isImage | boolean Optional. For image files which return alt text, width, height, etc in the param value. |
Definition at line 614 of file PKPContextService.inc.php.
References Core\getCurrentDate().
Referenced by APP\Services\ContextService\afterEditContext().
PKP\Services\PKPContextService::add | ( | $context, | |
$request | |||
) |
Definition at line 325 of file PKPContextService.inc.php.
References HookRegistry\call(), PKPServices\get(), Application\getContextDAO(), DAORegistry\getDAO(), PluginRegistry\loadAllPlugins(), and PKP\Services\SCHEMA_CONTEXT.
PKP\Services\PKPContextService::delete | ( | $context | ) |
Definition at line 460 of file PKPContextService.inc.php.
References HookRegistry\call(), PKPServices\get(), DAORegistry\getDAO(), and Config\getVar().
PKP\Services\PKPContextService::edit | ( | $context, | |
$params, | |||
$request | |||
) |
Definition at line 424 of file PKPContextService.inc.php.
References HookRegistry\call().
PKP\Services\PKPContextService::get | ( | $contextId | ) |
Definition at line 53 of file PKPContextService.inc.php.
References Application\getContextDAO().
PKP\Services\PKPContextService::getCount | ( | $args = [] | ) |
Definition at line 60 of file PKPContextService.inc.php.
References PKP\Services\PKPContextService\getQueryBuilder().
PKP\Services\PKPContextService::getFullProperties | ( | $context, | |
$args = null |
|||
) |
Definition at line 212 of file PKPContextService.inc.php.
References PKPServices\get(), PKP\Services\PKPContextService\getProperties(), and PKP\Services\SCHEMA_CONTEXT.
PKP\Services\PKPContextService::getIds | ( | $args = [] | ) |
Definition at line 67 of file PKPContextService.inc.php.
References PKP\Services\PKPContextService\getQueryBuilder().
PKP\Services\PKPContextService::getMany | ( | $args = array() | ) |
Get a collection of Context objects limited, filtered and sorted by $args
array | $args | { @option bool isEnabled @option int userId @option string searchPhrase @option int count @option int offset } |
Definition at line 100 of file PKPContextService.inc.php.
References Application\getContextDAO(), and PKP\Services\PKPContextService\getQueryBuilder().
PKP\Services\PKPContextService::getManySummary | ( | $args = [] | ) |
Get a summary of context information limited, filtered and sorted by $args.
This is faster than getMany if you don't need to retrieve all the context settings. It returns the data from the main table and the name of the context in its primary locale.
Definition at line 83 of file PKPContextService.inc.php.
References PKP\Services\PKPContextService\getQueryBuilder().
PKP\Services\PKPContextService::getMax | ( | $args = array() | ) |
Definition at line 121 of file PKPContextService.inc.php.
References PKP\Services\PKPContextService\getQueryBuilder().
PKP\Services\PKPContextService::getProperties | ( | $context, | |
$props, | |||
$args = null |
|||
) |
Definition at line 156 of file PKPContextService.inc.php.
References HookRegistry\call(), PKPServices\get(), and PKP\Services\SCHEMA_CONTEXT.
Referenced by PKP\Services\PKPContextService\getFullProperties(), and PKP\Services\PKPContextService\getSummaryProperties().
PKP\Services\PKPContextService::getQueryBuilder | ( | $args = array() | ) |
Definition at line 132 of file PKPContextService.inc.php.
References HookRegistry\call().
Referenced by PKP\Services\PKPContextService\getCount(), PKP\Services\PKPContextService\getIds(), PKP\Services\PKPContextService\getMany(), PKP\Services\PKPContextService\getManySummary(), and PKP\Services\PKPContextService\getMax().
PKP\Services\PKPContextService::getSummaryProperties | ( | $context, | |
$args = null |
|||
) |
Definition at line 203 of file PKPContextService.inc.php.
References PKPServices\get(), PKP\Services\PKPContextService\getProperties(), and PKP\Services\SCHEMA_CONTEXT.
PKP\Services\PKPContextService::moveTemporaryFile | ( | $context, | |
$temporaryFile, | |||
$fileNameBase, | |||
$userId, | |||
$localeKey = '' |
|||
) |
Move a temporary file to the context's public directory
$context | Context |
$temporaryFile | TemporaryFile |
$fileNameBase | string Unique identifier to use for the filename. The Extension and locale will be appended. |
$userId | int ID of the user who uploaded the temporary file |
$localeKey | string Example: en_US. Leave empty for a file that is not localized. |
Definition at line 559 of file PKPContextService.inc.php.
PKP\Services\PKPContextService::restoreLocaleDefaults | ( | $context, | |
$request, | |||
$locale | |||
) |
Restore default values for context settings in a specific local
Updates multilingual values of a context, restoring default values in a specific context. This may be useful when a new language has been added after a context has been created, or when translations change and a journal wants to take advantage of the new values.
$context | Context The context to restore default values for |
$request | Request |
$locale | string Locale key to restore defaults for. Example: en__US |
Definition at line 513 of file PKPContextService.inc.php.
References HookRegistry\call(), PKPServices\get(), PKPLocale\reloadLocale(), AppLocale\requireComponents(), and PKP\Services\SCHEMA_CONTEXT.
PKP\Services\PKPContextService::validate | ( | $action, | |
$props, | |||
$allowedLocales, | |||
$primaryLocale | |||
) |
Definition at line 221 of file PKPContextService.inc.php.
References ValidatorFactory\allowedLocales(), PKPServices\get(), ValidatorFactory\make(), AppLocale\requireComponents(), ValidatorFactory\required(), and PKP\Services\SCHEMA_CONTEXT.
array PKPContextService::$contextsFileDirName |
The file directory where context files are stored. Expects journals
or presses
.
Definition at line 48 of file PKPContextService.inc.php.
array PKPContextService::$installFileDirs |
List of file directories to create on installation. Use d to use the context ID in a file path.
Definition at line 39 of file PKPContextService.inc.php.