Open Journal Systems
3.3.0
|
Public Member Functions | |
edit ($site, $params, $request) | |
getFullProperties ($site, $args=null) | |
getProperties ($site, $props, $args=null) | |
getSummaryProperties ($site, $args=null) | |
moveTemporaryFile ($context, $temporaryFile, $fileNameBase, $userId, $localeKey='') | |
validate ($props, $allowedLocales, $primaryLocale) | |
Protected Member Functions | |
_saveFileParam ($site, $value, $settingName, $userId, $localeKey='', $isImage=false) | |
Definition at line 22 of file PKPSiteService.inc.php.
|
protected |
Handle a site setting for an uploaded file
This method is protected because all operations which edit the site should go through the editSite method in order to ensure that the appropriate hooks are fired.
$site | Site The site 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 261 of file PKPSiteService.inc.php.
References Core\getCurrentDate().
PKP\Services\PKPSiteService::edit | ( | $site, | |
$params, | |||
$request | |||
) |
Edit the site
This does not check if the user is authorized to edit the site, or validate or sanitize the new content.
$site | Context The context to edit |
$params | Array Key/value array of new data |
$request | Request |
Definition at line 173 of file PKPSiteService.inc.php.
References HookRegistry\call(), and DAORegistry\getDAO().
PKP\Services\PKPSiteService::getFullProperties | ( | $site, | |
$args = null |
|||
) |
Definition at line 56 of file PKPSiteService.inc.php.
References PKPServices\get(), PKP\Services\PKPSiteService\getProperties(), and PKP\Services\SCHEMA_SITE.
Referenced by PKP\Services\PKPSiteService\getSummaryProperties().
PKP\Services\PKPSiteService::getProperties | ( | $site, | |
$props, | |||
$args = null |
|||
) |
Definition at line 27 of file PKPSiteService.inc.php.
References HookRegistry\call(), PKPServices\get(), and PKP\Services\SCHEMA_SITE.
Referenced by PKP\Services\PKPSiteService\getFullProperties().
PKP\Services\PKPSiteService::getSummaryProperties | ( | $site, | |
$args = null |
|||
) |
Definition at line 49 of file PKPSiteService.inc.php.
References PKP\Services\PKPSiteService\getFullProperties().
PKP\Services\PKPSiteService::moveTemporaryFile | ( | $context, | |
$temporaryFile, | |||
$fileNameBase, | |||
$userId, | |||
$localeKey = '' |
|||
) |
Move a temporary file to the site'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 214 of file PKPSiteService.inc.php.
PKP\Services\PKPSiteService::validate | ( | $props, | |
$allowedLocales, | |||
$primaryLocale | |||
) |
Validate the properties of a site
Passes the properties through the SchemaService to validate them, and performs any additional checks needed to validate a site.
This does NOT authenticate the current user to perform the action.
$props | array The data to validate |
$allowedLocales | array Which locales are allowed for this context |
$primaryLocale | string |
Definition at line 75 of file PKPSiteService.inc.php.
References ValidatorFactory\allowedLocales(), PKPServices\get(), PKPApplication\get(), ValidatorFactory\make(), AppLocale\requireComponents(), ValidatorFactory\required(), PKP\Services\SCHEMA_PUBLICATION, PKP\Services\SCHEMA_SITE, and ValidatorFactory\temporaryFilesExist().