Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct () | |
addHeader ($name, $header, $args=[]) | |
addJavaScript ($name, $script, $args=[]) | |
addStyleSheet ($name, $style, $args=[]) | |
cacheLess ($path, $styles) | |
clearCssCache () | |
clearTemplateCache () | |
clearThemeTemplateCache ($hookName, $args) | |
compileLess ($name, $lessFile, $args=[]) | |
display ($template=null, $cache_id=null, $compile_id=null, $parent=null) | |
displaySidebar ($hookName, $args) | |
fetch ($template=null, $cache_id=null, $compile_id=null, $parent=null) | |
fetchAjax ($id, $url, $element='div') | |
fetchJson ($template, $status=true) | |
flush () | |
get_template_vars ($varname=null) | |
getCachedLessFilePath ($name) | |
getCompileId ($resourceName) | |
getFBV () | |
getResourcesByContext ($resources, $context) | |
getState ($key) | |
initialize ($request) | |
loadHtmlGalleyStyles ($htmlContent, $embeddedFiles) | |
register_function ($name, $impl, $cacheable=true, $cache_attrs=null) | |
registerJSLibrary () | |
registerJSLibraryData () | |
setCacheability ($cacheability=CACHEABILITY_PUBLIC) | |
setConstants ($names) | |
setLocaleKeys ($keys) | |
setState ($data) | |
setupBackendPage () | |
smartyCallHook ($params, $smarty) | |
smartyCompare ($a, $b, $strict=false, $invert=false) | |
smartyConcat () | |
smartyCSRF ($params, $smarty) | |
smartyEscape ($string, $esc_type='html', $char_set='ISO-8859-1') | |
smartyExplode ($string, $separator) | |
smartyFlush ($params, $smarty) | |
smartyHelp ($params, $smarty) | |
smartyHtmlOptionsTranslate ($params, $smarty) | |
smartyIterate ($params, $content, $smarty, &$repeat) | |
smartyLoadHeader ($params, $smarty) | |
smartyLoadNavigationMenuArea ($params, $smarty) | |
smartyLoadScript ($params, $smarty) | |
smartyLoadStylesheet ($params, $smarty) | |
smartyLoadUrlInDiv ($params, $smarty) | |
smartyLoadUrlInEl ($params, $smarty) | |
smartyNullLinkAction ($params, $smarty) | |
smartyPageInfo ($params, $smarty) | |
smartyPageLinks ($params, $smarty) | |
smartyPluckFiles ($params, $smarty) | |
smartyStrtotime ($string) | |
smartyTitle ($parameters, $smarty) | |
smartyToArray () | |
smartyTranslate ($params, $smarty) | |
smartyUrl ($parameters, $smarty) | |
Static Public Member Functions | |
static & | getManager ($request=null) |
Definition at line 50 of file PKPTemplateManager.inc.php.
PKPTemplateManager::__construct | ( | ) |
Constructor. Initialize template engine and assign basic template variables.
Definition at line 109 of file PKPTemplateManager.inc.php.
References Core\getBaseDir(), and CacheManager\getFileCachePath().
PKPTemplateManager::addHeader | ( | $name, | |
$header, | |||
$args = [] |
|||
) |
Add a page-specific item to the <head>.
$name | string Unique name for the header |
$header | string The header to be included. |
$args | array Key/value array defining display details priority int The order in which to print this header. Default: STYLE_SEQUENCE_NORMAL contexts string|array Where the header should be loaded. Default: array('frontend') |
Definition at line 533 of file PKPTemplateManager.inc.php.
Referenced by initialize().
PKPTemplateManager::addJavaScript | ( | $name, | |
$script, | |||
$args = [] |
|||
) |
Register a script with the script handler
$name | string Unique name for the script |
$script | string The script to be included. Should be a URL or, if the inline argument is included, script data to be output. |
$args | array Key/value array defining display details priority int The order in which to print this script. Default: STYLE_SEQUENCE_NORMAL contexts string|array Where the script should be loaded. Default: array('frontend') inline bool Whether the $script value should be output directly as script data. Used to pass backend data to the scripts. |
Definition at line 502 of file PKPTemplateManager.inc.php.
Referenced by display(), initialize(), registerJSLibrary(), registerJSLibraryData(), and setupBackendPage().
PKPTemplateManager::addStyleSheet | ( | $name, | |
$style, | |||
$args = [] |
|||
) |
Register a stylesheet with the style handler
$name | string Unique name for the stylesheet |
$style | string The stylesheet to be included. Should be a URL or, if the inline argument is included, stylesheet data to be output. |
$args | array Key/value array defining display details priority int The order in which to print this stylesheet. Default: STYLE_SEQUENCE_NORMAL contexts string|array Where the stylesheet should be loaded. Default: array('frontend') inline bool Whether the $stylesheet value should be output directly as stylesheet data. Used to pass backend data to the scripts. |
Definition at line 468 of file PKPTemplateManager.inc.php.
Referenced by TemplateManager\initialize(), initialize(), and setupBackendPage().
PKPTemplateManager::cacheLess | ( | $path, | |
$styles | |||
) |
Save LESS styles to a cached file
$path | string File path to save the compiled styles |
styles | string CSS styles compiled from the LESS |
Definition at line 432 of file PKPTemplateManager.inc.php.
PKPTemplateManager::clearCssCache | ( | ) |
Clear all compiled CSS files
Definition at line 1208 of file PKPTemplateManager.inc.php.
References CacheManager\getFileCachePath().
Referenced by clearThemeTemplateCache().
PKPTemplateManager::clearTemplateCache | ( | ) |
Clear template compile and cache directories.
Definition at line 1200 of file PKPTemplateManager.inc.php.
Referenced by clearThemeTemplateCache().
PKPTemplateManager::clearThemeTemplateCache | ( | $hookName, | |
$args | |||
) |
Clear the cache when a context or site has changed it's active theme
$hookName | string |
$args | array [ @option Context|Site The new values @option Context|Site The old values @option array Key/value of params that were modified @option Request ] |
Definition at line 1225 of file PKPTemplateManager.inc.php.
References clearCssCache(), and clearTemplateCache().
PKPTemplateManager::compileLess | ( | $name, | |
$lessFile, | |||
$args = [] |
|||
) |
Compile a LESS stylesheet
$name | string Unique name for this LESS stylesheet |
$lessFile | string Path to the LESS file to compile |
$args | array Optional arguments. Supports: 'baseUrl': Base URL to use when rewriting URLs in the LESS file. 'addLess': Array of additional LESS files to parse before compiling |
Definition at line 390 of file PKPTemplateManager.inc.php.
References HookRegistry\call().
PKPTemplateManager::display | ( | $template = null , |
|
$cache_id = null , |
|||
$compile_id = null , |
|||
$parent = null |
|||
) |
Definition at line 1130 of file PKPTemplateManager.inc.php.
References addJavaScript(), HookRegistry\call(), getCompileId(), DAORegistry\getDAO(), and Config\getVar().
PKPTemplateManager::displaySidebar | ( | $hookName, | |
$args | |||
) |
Display the sidebar
$hookName | string |
$args | array [ @option array Params passed to the hook @option Smarty @option string The output ] |
Definition at line 1282 of file PKPTemplateManager.inc.php.
References PluginRegistry\loadCategory().
PKPTemplateManager::fetch | ( | $template = null , |
|
$cache_id = null , |
|||
$compile_id = null , |
|||
$parent = null |
|||
) |
Definition at line 1069 of file PKPTemplateManager.inc.php.
References HookRegistry\call(), and getCompileId().
Referenced by fetchJson(), smartyHelp(), smartyLoadNavigationMenuArea(), smartyLoadUrlInEl(), and smartyNullLinkAction().
PKPTemplateManager::fetchAjax | ( | $id, | |
$url, | |||
$element = 'div' |
|||
) |
Fetch content via AJAX and add it to the DOM, wrapped in a container element.
$id | string ID to use for the generated container element. |
$url | string URL to fetch the contents from. |
$element | string Element to use for container. |
Definition at line 1088 of file PKPTemplateManager.inc.php.
References smartyLoadUrlInEl().
PKPTemplateManager::fetchJson | ( | $template, | |
$status = true |
|||
) |
Returns the template results as a JSON message.
$template | string Template filename (or Smarty resource name) |
$status | boolean |
Definition at line 1122 of file PKPTemplateManager.inc.php.
References fetch().
PKPTemplateManager::flush | ( | ) |
Definition at line 1513 of file PKPTemplateManager.inc.php.
PKPTemplateManager::get_template_vars | ( | $varname = null | ) |
DEPRECATED wrapper for Smarty2 backwards compatibility
$varname |
Definition at line 2219 of file PKPTemplateManager.inc.php.
References Config\getVar().
Referenced by setupBackendPage().
PKPTemplateManager::getCachedLessFilePath | ( | $name | ) |
Retrieve the file path for a cached LESS file
$name | string Unique name for the LESS file |
Definition at line 447 of file PKPTemplateManager.inc.php.
References CacheManager\getFileCachePath().
PKPTemplateManager::getCompileId | ( | $resourceName | ) |
Calculate a compile ID for a resource.
$resourceName | string Resource name. |
Definition at line 1104 of file PKPTemplateManager.inc.php.
References Config\getVar().
PKPTemplateManager::getFBV | ( | ) |
Return an instance of the Form Builder Vocabulary class.
Definition at line 1264 of file PKPTemplateManager.inc.php.
Referenced by initialize().
|
static |
Return an instance of the template manager.
$request | PKPRequest |
Definition at line 1239 of file PKPTemplateManager.inc.php.
References Registry\get(), PluginRegistry\getPlugins(), Config\getVar(), and PluginRegistry\loadCategory().
Referenced by QuickSubmitPlugin\_cancelSubmit(), MarkupHandler\_conversion(), HtmlArticleGalleyPlugin\_getHTMLContents(), InformationCenterHandler\_listNotes(), FileInformationCenterHandler\_listPastNotes(), ThemePlugin\_registerScripts(), Plugin\_registerTemplateResource(), QuickSubmitPlugin\_reloadForm(), LegacyJR1\_reportXML(), PKPReviewRoundTabHandler\_reviewRound(), QuickSubmitPlugin\_saveSubmit(), IssueHandler\_setupIssueTemplate(), PKPCatalogHandler\_setupPaginationTemplate(), OrcidHandler\about(), AboutSiteHandler\aboutThisPublishingSystem(), ManagementHandler\access(), RegistrationHandler\activateUser(), UsageStatsPlugin\addJavascriptData(), URNPubIdPlugin\addPublicationFormFields(), ImmersionThemePlugin\addToIssueForm(), ManagementHandler\announcements(), IssueHandler\archive(), LensGalleyPlugin\articleCallback(), DublinCoreMetaPlugin\articleView(), HtmlArticleGalleyPlugin\articleViewCallback(), AssignToIssueHandler\assign(), PKPUserHandler\authorizationDenied(), InformationHandler\authorize(), AboutContextHandler\authorize(), SearchHandler\authors(), MarkupHandler\batch(), StaticPagesPlugin\callbackHandleContent(), SwordPlugin\callbackSettingsTab(), PKPCatalogHandler\category(), LoginHandler\changePassword(), AdminHandler\clearTemplateCache(), GatewayHandler\clockss(), AboutContextHandler\contact(), ManagementHandler\context(), AdminHandler\contexts(), PageHandler\css(), IssueHandler\current(), MaintenanceForm\dbInstallError(), DOIPubIdExportPlugin\display(), MaintenanceForm\display(), ViewSubmissionMetadataHandler\display(), UserRoleForm\display(), LoginChangePasswordForm\display(), PaypalPaymentForm\display(), DOAJExportPlugin\display(), PubMedExportPlugin\display(), QuickSubmitPlugin\display(), ImportExportPlugin\display(), NativeImportExportPlugin\display(), PKPUserImportExportPlugin\display(), UserForm\display(), AuthorDepositForm\display(), UserDisableForm\display(), SwordImportExportPlugin\display(), QuickSubmitForm\display(), UserInstitutionalSubscriptionForm\display(), UserIndividualSubscriptionForm\display(), PubObjectsExportPlugin\display(), InstallForm\display(), CounterReportPlugin\display(), UserDetailsForm\display(), SettingsHandler\distribution(), ManagementHandler\distribution(), DocumentLibraryHandler\documentLibrary(), ContextGridHandler\editContext(), ArticleGalleyGridHandler\editGalley(), IssueGridHandler\editIssue(), PKPManageFileApiHandler\editMetadata(), TextureHandler\editor(), PKPWorkflowHandler\editorDecisionActions(), PKPStatsHandler\editorial(), AboutContextHandler\editorialTeam(), ReviewFormGridHandler\editReviewForm(), PKPSiteHandler\editTheme(), PKPContextHandler\editTheme(), UpgradeForm\execute(), InstallForm\execute(), SubmissionSubmitStep1Form\fetch(), PublicIdentifiersForm\fetch(), RolesForm\fetch(), SubmissionSubmitStep3Form\fetch(), PKPReviewerReviewStep2Form\fetch(), ContactForm\fetch(), ReviewFormElements\fetch(), IssueAccessForm\fetch(), PreviewReviewForm\fetch(), AdvancedSearchReviewerForm\fetch(), PLNStatusForm\fetch(), ManageProofFilesForm\fetch(), InstallLanguageForm\fetch(), AssignPublicIdentifiersForm\fetch(), PKPReviewerReviewStep1Form\fetch(), NewLibraryFileForm\fetch(), IdentityForm\fetch(), PKPSubmissionSubmitStep3Form\fetch(), LibraryFileForm\fetch(), ManageQueryNoteFilesForm\fetch(), APIProfileForm\fetch(), UserEmailForm\fetch(), CreateReviewerForm\fetch(), UploadPluginForm\fetch(), ResolverPlugin\fetch(), EmailReviewerForm\fetch(), ReviewerGossipForm\fetch(), NavigationMenuForm\fetch(), ReviewFormForm\fetch(), SwordSettingsForm\fetch(), TextureArticleGalleyForm\fetch(), NewFileNoteForm\fetch(), AnnouncementTypeForm\fetch(), SubmissionSubmitForm\fetch(), CitationStyleLanguageSettingsForm\fetch(), ReviewFormElementForm\fetch(), NewNoteForm\fetch(), IssueGalleyForm\fetch(), SendReviewsForm\fetch(), GoogleAnalyticsSettingsForm\fetch(), PKPNavigationMenuItemsForm\fetch(), IssueForm\fetch(), EditReviewForm\fetch(), AnnouncementFeedSettingsForm\fetch(), PKPStageParticipantNotifyForm\fetch(), SubscriptionSSOSettingsForm\fetch(), PKPAssignPublicIdentifiersForm\fetch(), ArticleGalleyForm\fetch(), PKPReviewerReviewStep3Form\fetch(), ChangePasswordForm\fetch(), WebFeedSettingsForm\fetch(), PKPPublicIdentifiersForm\fetch(), AnnouncementFeedGatewayPlugin\fetch(), UsageStatsSettingsForm\fetch(), OrcidProfileSettingsForm\fetch(), WebFeedGatewayPlugin\fetch(), PKPSectionForm\fetch(), PKPSubmissionSubmitStep1Form\fetch(), StaticPageForm\fetch(), PLNSettingsForm\fetch(), ReviewFormElementResponseItemListbuilderHandler\fetch(), ReviewerReviewForm\fetch(), SubscriptionForm\fetch(), GenreForm\fetch(), RegistrationForm\fetch(), MarkupProfileSettingsForm\fetch(), ReviewReminderForm\fetch(), SubscriptionPolicyForm\fetch(), SubscriptionTypeForm\fetch(), SwordDepositPointForm\fetch(), PLNGatewayPlugin\fetch(), QueryNoteForm\fetch(), SectionForm\fetch(), URNSettingsForm\fetch(), EditorDecisionWithEmailForm\fetch(), MedraSettingsForm\fetch(), AddParticipantForm\fetch(), EditorDecisionForm\fetch(), PublicProfileForm\fetch(), PKPAuthorForm\fetch(), PKPNotificationSettingsForm\fetch(), SubmissionFilesMetadataForm\fetch(), UserGroupForm\fetch(), RecommendationForm\fetch(), Form\fetch(), CategoryForm\fetch(), MarkupSettingsForm\fetch(), QueryForm\fetch(), ListbuilderHandler\fetch(), PKPSubmissionFilesUploadBaseForm\fetch(), ReviewerForm\fetch(), UploadImageForm\fetch(), GridHandler\fetchGrid(), PKPNotificationOperationManager\fetchLinkActionNotificationContent(), AuthorDashboardReviewRoundTabHandler\fetchReviewRoundInfo(), WorkflowTabHandler\fetchTab(), AuthorDashboardTabHandler\fetchTab(), PKPWorkflowTabHandler\fetchTab(), CollapsibleGridFeature\fetchUIElements(), InfiniteScrollingFeature\fetchUIElements(), PagingFeature\fetchUIElements(), OrderItemsFeature\fetchUIElements(), PKPFileUploadWizardHandler\finishFileSubmission(), PKPNotificationOperationManager\formatToInPlaceNotification(), CitationStyleLanguagePlugin\getArticleTemplateData(), NotificationsGridCellProvider\getCellActions(), PKP\components\listPanels\PKPSubmissionsListPanel\getConfig(), PKP\Services\PKPNavigationMenuService\getDisplayStatus(), APP\Services\NavigationMenuService\getDisplayStatusCallback(), QuickSubmitForm\getIssueOptions(), PKPNotificationManager\getNotificationContents(), NavigationMenuItemsGridCellProvider\getTemplateVarsFromRowColumn(), NavigationMenusGridCellProvider\getTemplateVarsFromRowColumn(), ManualPaymentPlugin\handle(), PaypalPaymentPlugin\handle(), OrcidProfilePlugin\handleFormDisplay(), PKPToolsHandler\importexport(), IndexHandler\index(), InstallHandler\index(), LoginHandler\index(), PaymentsHandler\index(), InformationHandler\index(), AnnouncementHandler\index(), AboutContextHandler\index(), DashboardHandler\index(), ManageIssuesHandler\index(), PKPToolsHandler\index(), PKPWorkflowHandler\index(), AdminHandler\index(), SwordDepositPointsGridHandler\index(), CustomBlockForm\initData(), StaticPageForm\initData(), UploadImageForm\initData(), ManagementHandler\initialize(), AdminHandler\initialize(), InstallHandler\install(), MaintenanceForm\installError(), InstallHandler\installUpgrade(), LensGalleyPlugin\issueCallback(), PdfJsViewerPlugin\issueCallback(), IssueGridHandler\issueGalleys(), IssueGridHandler\issueToc(), UsageStatsPlugin\loadJavascript(), GatewayHandler\lockss(), LoginHandler\lostPassword(), GoogleAnalyticsPlugin\manage(), PubObjectsExportPlugin\manage(), SubscriptionSSOPlugin\manage(), CustomBlockManagerPlugin\manage(), AnnouncementFeedPlugin\manage(), MarkupPlugin\manage(), OrcidProfilePlugin\manage(), OrcidHandler\orcidVerify(), QueriesGridHandler\participants(), PaymentHandler\pay(), PaymentsHandler\payments(), PKPToolsHandler\permissions(), NavigationMenuItemHandler\preview(), AboutSiteHandler\privacy(), UsageStatsHandler\privacyInformation(), TemplateBasedFilter\process(), ProfileHandler\profile(), MarkupHandler\profile(), PKPStatsHandler\publications(), PublishHandler\publish(), QueriesGridHandler\readQuery(), AuthorReviewerGridHandler\readReview(), PKPReviewerGridHandler\readReview(), PKPAuthorDashboardHandler\readSubmissionEmail(), RegistrationHandler\register(), MarkupPlugin\register(), GoogleAnalyticsPlugin\registerScript(), GridCellProvider\render(), GridHandler\renderFilter(), GridHandler\renderGridBodyPartsInternally(), CategoryGridHandler\renderRowInternally(), GridHandler\renderRowInternally(), PKPToolsHandler\reportGenerator(), LoginHandler\requestResetPassword(), LoginHandler\resetPassword(), ReviewFormGridHandler\reviewFormElements(), PKPReviewerGridHandler\reviewHistory(), SearchHandler\search(), OpenAccessNotification\sendNotification(), MarkupSettingsTabHandler\settings(), AdminHandler\settings(), WorkflowHandler\setupIndex(), InformationHandler\setupTemplate(), PKPAuthorDashboardHandler\setupTemplate(), PKPWorkflowTabHandler\setupTemplate(), InformationCenterHandler\setupTemplate(), PKPSubmissionHandler\setupTemplate(), FileInformationCenterHandler\setupTemplate(), SearchHandler\setupTemplate(), PKPHandler\setupTemplate(), PKPReviewerHandler\showDeclineReview(), LoginHandler\signIn(), LoginHandler\signInAsUser(), PKPFileUploadWizardHandler\startWizard(), PKPToolsHandler\statistics(), PLNHandler\status(), PKPReviewerHandler\step(), PKPSubmissionHandler\step(), PKPReviewerHandler\submission(), PKPAuthorDashboardHandler\submission(), PdfJsViewerPlugin\submissionCallback(), PKPWorkflowHandler\submissionProgressBar(), AboutContextHandler\submissions(), GoogleScholarPlugin\submissionView(), PaymentsHandler\subscriptionPolicies(), AboutHandler\subscriptions(), UserHandler\subscriptions(), PaymentsHandler\subscriptions(), PaymentsHandler\subscriptionTypes(), SwordSettingsTabHandler\swordSettings(), AdminHandler\systemInfo(), PageHandler\tasks(), DashboardHandler\tasks(), OAIMetadataFormat_MARC\toXml(), OAIMetadataFormat_MARC21\toXml(), MarkupHandler\triggerConversion(), InstallHandler\upgrade(), ContextGridHandler\users(), PKPStatsHandler\users(), RegistrationHandler\validate(), BrowseBySectionHandler\view(), StaticPagesHandler\view(), AnnouncementHandler\view(), NavigationMenuItemHandler\view(), IssueHandler\view(), ArticleHandler\view(), SubmissionInformationCenterHandler\viewHistory(), FileInformationCenterHandler\viewHistory(), SubmissionInformationCenterHandler\viewInformationCenter(), InformationCenterHandler\viewInformationCenter(), FileInformationCenterHandler\viewInformationCenter(), SubmissionDocumentsFilesGridHandler\viewLibrary(), SubmissionInformationCenterHandler\viewNotes(), FileInformationCenterHandler\viewNotes(), PluginGalleryGridHandler\viewPlugin(), ManagementHandler\website(), PKPSubmissionHandler\wizard(), AdminHandler\wizard(), SettingsHandler\workflow(), and ManagementHandler\workflow().
PKPTemplateManager::getResourcesByContext | ( | $resources, | |
$context | |||
) |
Get resources assigned to a context
A helper function which retrieves script, style and header assets assigned to a particular context.
$resources | array Requested resources |
$context | string Requested context |
Definition at line 2085 of file PKPTemplateManager.inc.php.
References $op.
Referenced by loadHtmlGalleyStyles(), smartyLoadHeader(), smartyLoadScript(), and smartyLoadStylesheet().
PKPTemplateManager::getState | ( | $key | ) |
Get a piece of the state data
string | $key |
Definition at line 581 of file PKPTemplateManager.inc.php.
Referenced by TemplateManager\setupBackendPage().
PKPTemplateManager::initialize | ( | $request | ) |
Initialize the template manager.
$request | PKPRequest |
Reimplemented in TemplateManager.
Definition at line 134 of file PKPTemplateManager.inc.php.
References $application, addHeader(), addJavaScript(), addStyleSheet(), PKPServices\get(), PKPApplication\get(), getFBV(), AppLocale\getLocale(), PKPLocale\getLocaleDirection(), PluginRegistry\getPlugins(), Config\getVar(), Validation\isLoggedIn(), Validation\isLoggedInAs(), HookRegistry\register(), AppLocale\requireComponents(), and setConstants().
PKPTemplateManager::loadHtmlGalleyStyles | ( | $htmlContent, | |
$embeddedFiles | |||
) |
Inject default styles into a HTML galley
Any styles assigned to the htmlGalley
context will be injected into the galley unless the galley already has an embedded CSS file.
$htmlContent | string The HTML file content |
$embeddedFiles | array Additional files embedded in this galley |
Definition at line 1917 of file PKPTemplateManager.inc.php.
References getResourcesByContext().
PKPTemplateManager::register_function | ( | $name, | |
$impl, | |||
$cacheable = true , |
|||
$cache_attrs = null |
|||
) |
DEPRECATED wrapper for Smarty2 backwards compatibility
$name | |
$impl | |
$cacheable | |
$cache_attrs |
Definition at line 2231 of file PKPTemplateManager.inc.php.
References Config\getVar().
PKPTemplateManager::registerJSLibrary | ( | ) |
Register all files required by the core JavaScript library
Definition at line 599 of file PKPTemplateManager.inc.php.
References addJavaScript(), AppLocale\getLocale(), and Config\getVar().
Referenced by setupBackendPage().
PKPTemplateManager::registerJSLibraryData | ( | ) |
Register JavaScript data used by the core JS library
This function registers script data that is required by the core JS library. This data is queued after jQuery but before the pkp-lib framework, allowing dynamic data to be passed to the framework. It is intended to be used for passing constants and locale strings, but plugins may also take advantage of a hook to include data required by their own scripts, when integrating with the pkp-lib framework.
Definition at line 682 of file PKPTemplateManager.inc.php.
References addJavaScript(), AppLocale\getLocale(), AppLocale\getPrimaryLocale(), and Config\getVar().
Referenced by setupBackendPage().
PKPTemplateManager::setCacheability | ( | $cacheability = CACHEABILITY_PUBLIC | ) |
Flag the page as cacheable (or not).
$cacheability | boolean optional |
Definition at line 376 of file PKPTemplateManager.inc.php.
PKPTemplateManager::setConstants | ( | $names | ) |
Set constants to be exposed in JavaScript at pkp.const.<constant>
array | $names | Array of constant names |
Definition at line 556 of file PKPTemplateManager.inc.php.
Referenced by initialize(), and setupBackendPage().
PKPTemplateManager::setLocaleKeys | ( | $keys | ) |
Set locale keys to be exposed in JavaScript at pkp.localeKeys.<key>
array | $keys | Array of locale keys |
Definition at line 567 of file PKPTemplateManager.inc.php.
Referenced by setupBackendPage().
PKPTemplateManager::setState | ( | $data | ) |
Set initial state data to be managed by the Vue.js component on this page
array | $data |
Definition at line 592 of file PKPTemplateManager.inc.php.
Referenced by TemplateManager\setupBackendPage(), and setupBackendPage().
PKPTemplateManager::setupBackendPage | ( | ) |
Set up the template requirements for editorial backend pages
Reimplemented in TemplateManager.
Definition at line 727 of file PKPTemplateManager.inc.php.
References addJavaScript(), addStyleSheet(), HookRegistry\call(), PKPServices\get(), PKPApplication\get(), get_template_vars(), DAORegistry\getDAO(), AppLocale\getLocale(), PKPLocale\getLocaleStyleSheet(), Config\getVar(), registerJSLibrary(), registerJSLibraryData(), AppLocale\requireComponents(), setConstants(), setLocaleKeys(), and setState().
PKPTemplateManager::smartyCallHook | ( | $params, | |
$smarty | |||
) |
Call hooks from a template.
Definition at line 1523 of file PKPTemplateManager.inc.php.
References HookRegistry\call().
PKPTemplateManager::smartyCompare | ( | $a, | |
$b, | |||
$strict = false , |
|||
$invert = false |
|||
) |
Compare the parameters.
$a | mixed Parameter A |
$a | mixed Parameter B |
$strict | boolean True iff a strict (===) compare should be used |
$invert | booelan True iff the output should be inverted |
Definition at line 1748 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyConcat | ( | ) |
Concatenate the parameters and return the result.
Definition at line 1736 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyCSRF | ( | $params, | |
$smarty | |||
) |
Smarty usage: {csrf}
Custom Smarty function for inserting a CSRF token.
$params | array associative array |
$smarty | Smarty |
Definition at line 1857 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyEscape | ( | $string, | |
$esc_type = 'html' , |
|||
$char_set = 'ISO-8859-1' |
|||
) |
Override the built-in smarty escape modifier to add the jqselector escaping method.
Definition at line 1771 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyExplode | ( | $string, | |
$separator | |||
) |
Split the supplied string by the supplied separator.
Definition at line 1763 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyFlush | ( | $params, | |
$smarty | |||
) |
Flush the output buffer. This is useful in cases where Smarty templates are calling functions that take a while to execute so that they can display a progress indicator or a message stating that the operation may take a while.
Definition at line 1509 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyHelp | ( | $params, | |
$smarty | |||
) |
Smarty usage: {help file="someFile" section="someSection" textKey="some.text.key"}
Custom Smarty function for displaying a context-sensitive help link.
$smarty | Smarty |
Definition at line 1377 of file PKPTemplateManager.inc.php.
References fetch().
PKPTemplateManager::smartyHtmlOptionsTranslate | ( | $params, | |
$smarty | |||
) |
Smarty usage: {html_options_translate ...} For parameter usage, see http://smarty.php.net/manual/en/language.function.html.options.php
Identical to Smarty's "html_options" function except option values are translated from i18n keys.
$params | array |
$smarty | Smarty |
Definition at line 1410 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyIterate | ( | $params, | |
$content, | |||
$smarty, | |||
& | $repeat | ||
) |
Iterator function for looping through objects extending the ItemIterator class. Parameters:
Definition at line 1445 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyLoadHeader | ( | $params, | |
$smarty | |||
) |
Smarty usage: {load_header context="frontent" headers=$headers}
Custom Smarty function for printing scripts attached to a context.
$params | array associative array |
$smarty | Smarty |
Definition at line 1998 of file PKPTemplateManager.inc.php.
References getResourcesByContext().
PKPTemplateManager::smartyLoadNavigationMenuArea | ( | $params, | |
$smarty | |||
) |
Smarty usage: {load_menu name=$areaName path=$declaredMenuTemplatePath id=$id ulClass=$ulClass liClass=$liClass}
Custom Smarty function for printing navigation menu areas attached to a context.
$params | array associative array |
$smarty | Smarty |
Definition at line 2026 of file PKPTemplateManager.inc.php.
References fetch(), PKPServices\get(), DAORegistry\getDAO(), PluginRegistry\getPlugins(), and PluginRegistry\loadCategory().
PKPTemplateManager::smartyLoadScript | ( | $params, | |
$smarty | |||
) |
Smarty usage: {load_script context="backend" scripts=$scripts}
Custom Smarty function for printing scripts attached to a context.
$params | array associative array |
$smarty | Smarty |
Definition at line 1958 of file PKPTemplateManager.inc.php.
References DAORegistry\getDAO(), and getResourcesByContext().
PKPTemplateManager::smartyLoadStylesheet | ( | $params, | |
$smarty | |||
) |
Smarty usage: {load_stylesheet context="frontend" stylesheets=$stylesheets}
Custom Smarty function for printing stylesheets attached to a context.
$params | array associative array |
$smarty | Smarty |
Definition at line 1876 of file PKPTemplateManager.inc.php.
References DAORegistry\getDAO(), and getResourcesByContext().
PKPTemplateManager::smartyLoadUrlInDiv | ( | $params, | |
$smarty | |||
) |
Smarty usage: {load_url_in_div id="someHtmlId" url="http://the.url.to.be.loaded.into.the.grid"}
Custom Smarty function for loading a URL via AJAX into a DIV. Convenience wrapper for smartyLoadUrlInEl.
$params | array associative array |
$smarty | Smarty |
Definition at line 1844 of file PKPTemplateManager.inc.php.
References smartyLoadUrlInEl().
PKPTemplateManager::smartyLoadUrlInEl | ( | $params, | |
$smarty | |||
) |
Smarty usage: {load_url_in_el el="htmlElement" id="someHtmlId" url="http://the.url.to.be.loaded.into.the.grid"}
Custom Smarty function for loading a URL via AJAX into any HTML element
$params | array associative array |
$smarty | Smarty |
Definition at line 1803 of file PKPTemplateManager.inc.php.
References fetch().
Referenced by fetchAjax(), and smartyLoadUrlInDiv().
PKPTemplateManager::smartyNullLinkAction | ( | $params, | |
$smarty | |||
) |
Smarty usage: {null_link_action id="linkId" key="localization.key.name" image="imageClassName"}
Custom Smarty function for displaying a null link action; these will typically be attached and handled in Javascript.
$smarty | Smarty |
Definition at line 1350 of file PKPTemplateManager.inc.php.
References fetch().
PKPTemplateManager::smartyPageInfo | ( | $params, | |
$smarty | |||
) |
Display page information for a listing of items that has been divided onto multiple pages. Usage: {page_info from=$myIterator}
Definition at line 1478 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyPageLinks | ( | $params, | |
$smarty | |||
) |
Display page links for a listing of items that has been divided onto multiple pages. Usage: {page_links name="nameMustMatchGetRangeInfoCall" iterator=$myIterator additional_param=myAdditionalParameterValue }
Definition at line 1658 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyPluckFiles | ( | $params, | |
$smarty | |||
) |
Smarty usage: {pluck_files files=$availableFiles by="chapter" value=$chapterId}
Custom Smarty function for plucking files from the array of $availableFiles related to a submission. Intended to be used on the frontend
$params | array associative array |
$smarty | Smarty |
Definition at line 2126 of file PKPTemplateManager.inc.php.
References DAORegistry\getDAO().
PKPTemplateManager::smartyStrtotime | ( | $string | ) |
Convert a string to a numeric time.
Definition at line 1756 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyTitle | ( | $parameters, | |
$smarty | |||
) |
Generate the <title> tag for a page
Usage: {title value="Journal Settings"}
$parameters | array |
$smarty | object Available parameters:
|
Definition at line 1631 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyToArray | ( | ) |
Convert the parameters of a function to an array.
Definition at line 1729 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyTranslate | ( | $params, | |
$smarty | |||
) |
Smarty usage: {translate key="localization.key.name" [paramName="paramValue" ...]}
Custom Smarty function for translating localization keys. Substitution works by replacing tokens like "{$foo}" with the value of the parameter named "foo" (if supplied).
$params | array associative array, must contain "key" parameter for string to translate plus zero or more named parameters for substitution. Translation variables can be specified also as an optional associative array named "params". |
$smarty | Smarty |
Definition at line 1327 of file PKPTemplateManager.inc.php.
PKPTemplateManager::smartyUrl | ( | $parameters, | |
$smarty | |||
) |
Generate a URL into a PKPApp.
$params | array |
$smarty | object Available parameters:
|
Definition at line 1544 of file PKPTemplateManager.inc.php.
References $application, $op, and PKPApplication\get().