This repository was archived by the owner on Nov 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +18
-12
lines changed Expand file tree Collapse file tree 7 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,11 @@ Inside your Smarty template you would write:
123
123
124
124
{urlFor name="hello" options="name.Josh|age.26"}
125
125
126
- You can easily pass variables that are arrays using the (.) or object using the (->) by doing:
126
+ or with the new array syntax:
127
+
128
+ {urlFor name="hello" options=["name" => "Josh", "age" => "26"]}
129
+
130
+ You can easily pass variables that are arrays as normal or using the (.):
127
131
128
132
<a href="{urlFor name="hello" options="name.{$person.name}|age.{$person.age}"}">Hello {$name}</a>
129
133
Original file line number Diff line number Diff line change 6
6
* @author Andrew Smith
7
7
* @link http://www.slimframework.com
8
8
* @copyright 2013 Josh Lockhart
9
- * @version 0.1.0
9
+ * @version 0.1.2
10
10
* @package SlimViews
11
11
*
12
12
* MIT LICENSE
@@ -78,9 +78,9 @@ class Smarty extends \Slim\View
78
78
*
79
79
* This method will output the rendered template content
80
80
*
81
- * @param string $template The path to the template, relative to the templates directory.
81
+ * @param string $template The path to the template, relative to the templates directory.
82
82
* @param null $data
83
- * @return void
83
+ * @return string
84
84
*/
85
85
public function render ($ template , $ data = null )
86
86
{
Original file line number Diff line number Diff line change 6
6
* Type: function
7
7
* Name: baseUrl
8
8
* Purpose: outputs url for a function with the defined name method
9
+ * version 0.1.2
10
+ * package SlimViews
9
11
* -------------------------------------------------------------
10
12
*/
11
13
function smarty_function_baseUrl ($ params , $ template )
Original file line number Diff line number Diff line change 6
6
* Type: function
7
7
* Name: siteUrl
8
8
* Purpose: outputs url for a function with the defined name method
9
- * version 0.1.0
9
+ * version 0.1.2
10
10
* package SlimViews
11
11
* -------------------------------------------------------------
12
12
*/
Original file line number Diff line number Diff line change 1
1
<?php
2
- /*
2
+ /**
3
3
* Smarty plugin
4
4
* -------------------------------------------------------------
5
5
* File: function.urlFor.php
6
6
* Type: function
7
7
* Name: urlFor
8
8
* Purpose: outputs url for a function with the defined name method
9
- * version 0.1.0
10
- * package SlimViews
9
+ * @ version 0.1.2
10
+ * @ package SlimViews
11
11
* -------------------------------------------------------------
12
12
*/
13
13
function smarty_function_urlFor ($ params , $ template )
Original file line number Diff line number Diff line change 6
6
* @author Andrew Smith
7
7
* @link http://www.slimframework.com
8
8
* @copyright 2013 Josh Lockhart
9
- * @version 0.1.0
9
+ * @version 0.1.2
10
10
* @package SlimViews
11
11
*
12
12
* MIT LICENSE
@@ -77,9 +77,9 @@ class Twig extends \Slim\View
77
77
*
78
78
* This method will output the rendered template content
79
79
*
80
- * @param string $template The path to the Twig template, relative to the Twig templates directory.
80
+ * @param string $template The path to the Twig template, relative to the Twig templates directory.
81
81
* @param null $data
82
- * @return void
82
+ * @return string
83
83
*/
84
84
public function render ($ template , $ data = null )
85
85
{
Original file line number Diff line number Diff line change 6
6
* @author Andrew Smith
7
7
* @link http://www.slimframework.com
8
8
* @copyright 2013 Josh Lockhart
9
- * @version 0.1.0
9
+ * @version 0.1.2
10
10
* @package SlimViews
11
11
*
12
12
* MIT LICENSE
You can’t perform that action at this time.
0 commit comments