Метод | Описание | |
---|---|---|
__construct ( $request ) | Constructor. | |
_smarty_include ( $params ) | Override the Smarty {include . | |
addHeader ( $name, $header, $args = [] ) | Add a page-specific item to the . | |
addJavaScript ( $name, $script, $args = [] ) | Register a script with the script handler | |
addStyleSheet ( $name, $style, $args = [] ) | Register a stylesheet with the style handler | |
cacheLess ( $path, $styles ) : boolean | Save LESS styles to a cached file | |
clearCssCache ( ) | Clear all compiled CSS files | |
clearTemplateCache ( ) | Clear template compile and cache directories. | |
compileLess ( $name, $lessFile, $args = [] ) : string | Compile a LESS stylesheet | |
display ( $template, $sendContentType = null, $hookName = null, $display = true ) | Display the template. | |
fetch ( $resource_name, $cache_id = null, $compile_id = null, $display = false ) | ||
fetchAjax ( $id, $url, $element = 'div' ) : JSONMessage | Fetch content via AJAX and add it to the DOM, wrapped in a container element. | |
fetchJson ( $template, $status = true ) : JSONMessage | Returns the template results as a JSON message. | |
flush ( ) | ||
getCachedLessFilePath ( $name ) | Retrieve the file path for a cached LESS file | |
getCompileId ( $resourceName ) : string | Calculate a compile ID for a resource. | |
getFBV ( ) : TemplateManager | Return an instance of the Form Builder Vocabulary class. | |
getManager ( $request = null ) : TemplateManager | Return an instance of the template manager. | |
getResourcesByContext ( $resources, $context ) : array | Get resources assigned to a context | |
initialize ( ) | Initialize the template manager. | |
registerJSLibrary ( ) | Register all files required by the core JavaScript library | |
registerJSLibraryData ( ) | Register JavaScript data used by the core JS library | |
setCacheability ( $cacheability = CACHEABILITY_PUBLIC ) | Flag the page as cacheable (or not). | |
smartyAssign ( $value, $varName, $passThru = false ) | Assign a value to a template variable. | |
smartyCSRF ( $params, $smarty ) : string | Smarty usage: {csrf} | |
smartyCallHook ( $params, $smarty ) | Call hooks from a template. | |
smartyCompare ( $a, $b, $strict = false, $invert = false ) | Concatenate the parameters and return the result. | |
smartyConcat ( ) | Concatenate the parameters and return the result. | |
smartyExplode ( $string, $separator ) | Split the supplied string by the supplied separator. | |
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. | |
smartyHelp ( $params, $smarty ) : string | Smarty usage: {help file="someFile.md" section="someSection" textKey="some.text.key"} | |
smartyHtmlOptionsTranslate ( $params, $smarty ) | Smarty usage: {html_options_translate . | |
smartyIterate ( $params, $content, $smarty, &$repeat ) | Iterator function for looping through objects extending the ItemIterator class. | |
smartyLoadHeader ( $params, $smarty ) : string | Smarty usage: {load_header context="frontent" headers=$headers} | |
smartyLoadScript ( $params, $smarty ) : string | Smarty usage: {load_script context="backend" scripts=$scripts} | |
smartyLoadStylesheet ( $params, $smarty ) : string | Smarty usage: {load_stylesheet context="frontend" stylesheets=$stylesheets} | |
smartyLoadUrlInDiv ( $params, $smarty ) : string | Smarty usage: {load_url_in_div id="someHtmlId" url="http://the.url.to.be.loaded.into.the.grid"} | |
smartyLoadUrlInEl ( $params, $smarty ) : string | Smarty usage: {load_url_in_el el="htmlElement" id="someHtmlId" url="http://the.url.to.be.loaded.into.the.grid"} | |
smartyNullLinkAction ( $params, $smarty ) : string | Smarty usage: {null_link_action id="linkId" key="localization.key.name" image="imageClassName"} | |
smartyPageInfo ( $params, $smarty ) | Display page information for a listing of items that has been divided onto multiple pages. | |
smartyPageLinks ( $params, $smarty ) | Display page links for a listing of items that has been divided onto multiple pages. | |
smartyPluckFiles ( $params, $smarty ) : array | Smarty usage: {pluck_files files=$availableFiles by="chapter" value=$chapterId} | |
smartyStrtotime ( $string ) | Convert a string to a numeric time. | |
smartyToArray ( ) | Convert the parameters of a function to an array. | |
smartyTranslate ( $params, $smarty ) : string | Smarty usage: {translate key="localization.key.name" [paramName="paramValue" . | |
smartyUrl ( $parameters, $smarty ) | Generate a URL into a PKPApp. |
public __construct ( $request ) | ||
$request | PKPRequest |
public _smarty_include ( $params ) |
public addHeader ( $name, $header, $args = [] ) | ||
$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') |
public addJavaScript ( $name, $script, $args = [] ) | ||
$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. |
public addStyleSheet ( $name, $style, $args = [] ) | ||
$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. |
public clearTemplateCache ( ) |
public compileLess ( $name, $lessFile, $args = [] ) : string | ||
$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 | |
Результат | string | Compiled CSS styles |
public display ( $template, $sendContentType = null, $hookName = null, $display = true ) |
public fetch ( $resource_name, $cache_id = null, $compile_id = null, $display = false ) |
public fetchAjax ( $id, $url, $element = 'div' ) : JSONMessage | ||
$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. | |
Результат | JSONMessage | The JSON-encoded result. |
public fetchJson ( $template, $status = true ) : JSONMessage | ||
$template | string | |
$status | boolean | |
Результат | JSONMessage | JSON object |
public getCachedLessFilePath ( $name ) | ||
$name | string Unique name for the LESS file |
public getCompileId ( $resourceName ) : string | ||
$resourceName | string Resource name. | |
Результат | string |
public getFBV ( ) : TemplateManager | ||
Результат | TemplateManager | the template manager object |
static public getManager ( $request = null ) : TemplateManager | ||
$request | PKPRequest | |
Результат | TemplateManager | the template manager object |
public getResourcesByContext ( $resources, $context ) : array | ||
$resources | array Requested resources | |
$context | string Requested context | |
Результат | array | Resources assigned to these contexts |
public registerJSLibrary ( ) |
public registerJSLibraryData ( ) |
public setCacheability ( $cacheability = CACHEABILITY_PUBLIC ) | ||
$cacheability | boolean optional |
public smartyAssign ( $value, $varName, $passThru = false ) |
public smartyCSRF ( $params, $smarty ) : string | ||
$params | array associative array | |
$smarty | Smarty | |
Результат | string | of HTML |
public smartyCallHook ( $params, $smarty ) |
public smartyCompare ( $a, $b, $strict = false, $invert = false ) | ||
$a | mixed Parameter A | |
$strict | boolean True iff a strict (===) compare should be used | |
$invert | booelan True iff the output should be inverted |
public smartyConcat ( ) |
public smartyExplode ( $string, $separator ) |
public smartyFlush ( $params, $smarty ) |
public smartyHelp ( $params, $smarty ) : string | ||
$smarty | Smarty | |
Результат | string | the HTML for the generated link action |
public smartyHtmlOptionsTranslate ( $params, $smarty ) | ||
$params | array | |
$smarty | Smarty |
public smartyIterate ( $params, $content, $smarty, &$repeat ) |
public smartyLoadHeader ( $params, $smarty ) : string | ||
$params | array associative array | |
$smarty | Smarty | |
Результат | string | of HTML/Javascript |
public smartyLoadScript ( $params, $smarty ) : string | ||
$params | array associative array | |
$smarty | Smarty | |
Результат | string | of HTML/Javascript |
public smartyLoadStylesheet ( $params, $smarty ) : string | ||
$params | array associative array | |
$smarty | Smarty | |
Результат | string | of HTML/Javascript |
public smartyLoadUrlInDiv ( $params, $smarty ) : string | ||
$params | array associative array | |
$smarty | Smarty | |
Результат | string | of HTML/Javascript |
public smartyLoadUrlInEl ( $params, $smarty ) : string | ||
$params | array associative array | |
$smarty | Smarty | |
Результат | string | of HTML/Javascript |
public smartyNullLinkAction ( $params, $smarty ) : string | ||
$smarty | Smarty | |
Результат | string | the HTML for the generated link action |
public smartyPageInfo ( $params, $smarty ) |
public smartyPageLinks ( $params, $smarty ) |
public smartyPluckFiles ( $params, $smarty ) : array | ||
$params | array associative array | |
$smarty | Smarty | |
Результат | array | of SubmissionFile objects |
public smartyStrtotime ( $string ) |
public smartyToArray ( ) |
public smartyTranslate ( $params, $smarty ) : string | ||
$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 | |
Результат | string | the localized string, including any parameter substitutions |
public smartyUrl ( $parameters, $smarty ) | ||
$smarty | object Available parameters: - router: which router to use - context - page - component - op - path (array) - anchor - escape (default to true unless otherwise specified) - params: parameters to include in the URL if available as an array |