mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-01 05:44:41 +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
|
||||
*
|
||||
* @param string $template_name Name of the template file without path and
|
||||
* extension
|
||||
* @param string $template_name Name of the template file with neither path
|
||||
* 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 .
|
||||
'/' . $this->filesPath() . '/templates/';
|
||||
$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
|
||||
* renderable now.
|
||||
*/
|
||||
public function render($template_name) {
|
||||
public function render($template_name, $data = array()) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -37,10 +37,12 @@ class PageStyle extends Style implements StyleInterface {
|
||||
/**
|
||||
* Renders template file to HTML and send it to the output
|
||||
*
|
||||
* @param string $template_name Name of the template file without path but
|
||||
* with extension
|
||||
* @param string $template_name Name of the template file with neither path
|
||||
* 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
|
||||
// view.
|
||||
global $page, $version, $errors;
|
||||
|
@ -77,10 +77,12 @@ interface StyleInterface {
|
||||
/**
|
||||
* Renders template file to HTML and send it to the output
|
||||
*
|
||||
* @param string $template_name Name of the template file without path and
|
||||
* extension.
|
||||
* @param string $template_name Name of the template file with neither path
|
||||
* 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