mirror of
https://github.com/Mibew/mibew.git
synced 2025-04-25 15:56:07 +03:00
Add second argument to \Mibew\Style\StyleInterface::render
This commit is contained in:
parent
175686aded
commit
9c0348cce3
@ -37,10 +37,12 @@ class ChatStyle extends Style implements StyleInterface {
|
|||||||
/**
|
/**
|
||||||
* Renders template file to HTML and send it to the output
|
* Renders template file to HTML and send it to the output
|
||||||
*
|
*
|
||||||
* @param string $template_name Name of the template file without path and
|
* @param string $template_name Name of the template file with neither path
|
||||||
* extension
|
* nor extension.
|
||||||
|
* @param array $data Associative array of values that should be used for
|
||||||
|
* substitutions in a template.
|
||||||
*/
|
*/
|
||||||
public function render($template_name) {
|
public function render($template_name, $data = array()) {
|
||||||
$templates_root = MIBEW_FS_ROOT .
|
$templates_root = MIBEW_FS_ROOT .
|
||||||
'/' . $this->filesPath() . '/templates/';
|
'/' . $this->filesPath() . '/templates/';
|
||||||
$full_template_name = $template_name . '.tpl';
|
$full_template_name = $template_name . '.tpl';
|
||||||
|
@ -49,7 +49,7 @@ class InvitationStyle extends Style implements StyleInterface {
|
|||||||
* The method does not contain actual code because inviation styles are not
|
* The method does not contain actual code because inviation styles are not
|
||||||
* renderable now.
|
* renderable now.
|
||||||
*/
|
*/
|
||||||
public function render($template_name) {
|
public function render($template_name, $data = array()) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,10 +37,12 @@ class PageStyle extends Style implements StyleInterface {
|
|||||||
/**
|
/**
|
||||||
* Renders template file to HTML and send it to the output
|
* Renders template file to HTML and send it to the output
|
||||||
*
|
*
|
||||||
* @param string $template_name Name of the template file without path but
|
* @param string $template_name Name of the template file with neither path
|
||||||
* with extension
|
* nor extension.
|
||||||
|
* @param array $data Associative array of values that should be used for
|
||||||
|
* substitutions in a template.
|
||||||
*/
|
*/
|
||||||
public function render($template_name) {
|
public function render($template_name, $data = array()) {
|
||||||
// We need to import some variables to make them visible to required
|
// We need to import some variables to make them visible to required
|
||||||
// view.
|
// view.
|
||||||
global $page, $version, $errors;
|
global $page, $version, $errors;
|
||||||
|
@ -77,10 +77,12 @@ interface StyleInterface {
|
|||||||
/**
|
/**
|
||||||
* Renders template file to HTML and send it to the output
|
* Renders template file to HTML and send it to the output
|
||||||
*
|
*
|
||||||
* @param string $template_name Name of the template file without path and
|
* @param string $template_name Name of the template file with neither path
|
||||||
* extension.
|
* nor extension.
|
||||||
|
* @param array $data Associative array of values that should be used for
|
||||||
|
* substitutions in a template.
|
||||||
*/
|
*/
|
||||||
public function render($template_name);
|
public function render($template_name, $data = array());
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
Loading…
Reference in New Issue
Block a user