This repository was archived by the owner on Nov 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,7 +123,11 @@ Inside your Smarty template you would write:
123123
124124 {urlFor name="hello" options="name.Josh|age.26"}
125125
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 (.):
127131
128132 <a href="{urlFor name="hello" options="name.{$person.name}|age.{$person.age}"}">Hello {$name}</a>
129133
Original file line number Diff line number Diff line change 66 * @author Andrew Smith
77 * @link http://www.slimframework.com
88 * @copyright 2013 Josh Lockhart
9- * @version 0.1.0
9+ * @version 0.1.2
1010 * @package SlimViews
1111 *
1212 * MIT LICENSE
@@ -78,9 +78,9 @@ class Smarty extends \Slim\View
7878 *
7979 * This method will output the rendered template content
8080 *
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.
8282 * @param null $data
83- * @return void
83+ * @return string
8484 */
8585 public function render ($ template , $ data = null )
8686 {
Original file line number Diff line number Diff line change 66 * Type: function
77 * Name: baseUrl
88 * Purpose: outputs url for a function with the defined name method
9+ * version 0.1.2
10+ * package SlimViews
911 * -------------------------------------------------------------
1012 */
1113function smarty_function_baseUrl ($ params , $ template )
Original file line number Diff line number Diff line change 66 * Type: function
77 * Name: siteUrl
88 * Purpose: outputs url for a function with the defined name method
9- * version 0.1.0
9+ * version 0.1.2
1010 * package SlimViews
1111 * -------------------------------------------------------------
1212 */
Original file line number Diff line number Diff line change 11<?php
2- /*
2+ /**
33 * Smarty plugin
44 * -------------------------------------------------------------
55 * File: function.urlFor.php
66 * Type: function
77 * Name: urlFor
88 * 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
1111 * -------------------------------------------------------------
1212 */
1313function smarty_function_urlFor ($ params , $ template )
Original file line number Diff line number Diff line change 66 * @author Andrew Smith
77 * @link http://www.slimframework.com
88 * @copyright 2013 Josh Lockhart
9- * @version 0.1.0
9+ * @version 0.1.2
1010 * @package SlimViews
1111 *
1212 * MIT LICENSE
@@ -77,9 +77,9 @@ class Twig extends \Slim\View
7777 *
7878 * This method will output the rendered template content
7979 *
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.
8181 * @param null $data
82- * @return void
82+ * @return string
8383 */
8484 public function render ($ template , $ data = null )
8585 {
Original file line number Diff line number Diff line change 66 * @author Andrew Smith
77 * @link http://www.slimframework.com
88 * @copyright 2013 Josh Lockhart
9- * @version 0.1.0
9+ * @version 0.1.2
1010 * @package SlimViews
1111 *
1212 * MIT LICENSE
You can’t perform that action at this time.
0 commit comments