From 4e89221bb27ded74238c8d6254b842a4beb18f73 Mon Sep 17 00:00:00 2001 From: "Paul M. Jones" Date: Tue, 27 May 2014 10:25:13 -0500 Subject: [PATCH] update with newer variation on Aura.View --- example-code/Blog/Responder/views/_form.php | 12 ++++++------ example-code/Blog/Responder/views/_intro.php | 8 ++++---- example-code/Blog/Responder/views/add.php | 8 ++++---- example-code/Blog/Responder/views/browse.php | 4 +++- example-code/Blog/Responder/views/edit.php | 8 ++++---- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/example-code/Blog/Responder/views/_form.php b/example-code/Blog/Responder/views/_form.php index 178b4ca..f759b53 100644 --- a/example-code/Blog/Responder/views/_form.php +++ b/example-code/Blog/Responder/views/_form.php @@ -1,8 +1,8 @@ -ul()->items($blog->getMessages())->get(); ?> +ul()->items($this->_blog->getMessages()) ?> form(array( - 'method' => $method, - 'action' => $action, + 'method' => $this->_method, + 'action' => $this->_action, )); ?> @@ -11,7 +11,7 @@ $this->input(array( 'type' => 'text', 'name' => 'blog[title]', - 'value' => $blog->title, + 'value' => $this->_blog->title, )); ?> @@ -21,7 +21,7 @@ $this->input(array( 'type' => 'textarea', 'name' => 'blog[body]', - 'value' => $blog->body, + 'value' => $this->_blog->body, )); ?> @@ -29,7 +29,7 @@ diff --git a/example-code/Blog/Responder/views/_intro.php b/example-code/Blog/Responder/views/_intro.php index f1ee350..8c56c4a 100644 --- a/example-code/Blog/Responder/views/_intro.php +++ b/example-code/Blog/Responder/views/_intro.php @@ -1,8 +1,8 @@
-

title) ?>

- - intro) ?> -

a("/blog/read/{$blog->id}", 'Read More ...'); ?>

+

_blog->title) ?>

+ + _blog->intro) ?> +

a("/blog/read/{$this->_blog->id}", 'Read More ...'); ?>

diff --git a/example-code/Blog/Responder/views/add.php b/example-code/Blog/Responder/views/add.php index 1d5c46c..b85517e 100644 --- a/example-code/Blog/Responder/views/add.php +++ b/example-code/Blog/Responder/views/add.php @@ -1,8 +1,8 @@

Add New Blog Post

render('_form', array( - 'method' => 'POST', - 'action' => '/blog/add', - 'submit' => 'Create', - 'blog' => $this->blog, + '_method' => 'POST', + '_action' => '/blog/add', + '_submit' => 'Create', + '_blog' => $this->blog, )); ?> diff --git a/example-code/Blog/Responder/views/browse.php b/example-code/Blog/Responder/views/browse.php index de6e840..597298f 100644 --- a/example-code/Blog/Responder/views/browse.php +++ b/example-code/Blog/Responder/views/browse.php @@ -1,3 +1,5 @@ collection as $blog) { - echo $this->render('_intro', array('blog' => $blog)); + echo $this->render('_intro', array( + '_blog' => $blog, + )); } ?> diff --git a/example-code/Blog/Responder/views/edit.php b/example-code/Blog/Responder/views/edit.php index d921da9..50bd470 100644 --- a/example-code/Blog/Responder/views/edit.php +++ b/example-code/Blog/Responder/views/edit.php @@ -3,8 +3,8 @@ ul()->items($this->blog->getMessages())->get(); ?> render('_form', array( - 'method' => 'PATCH', - 'action' => '/blog/edit', - 'submit' => 'Update', - 'blog' => $this->blog, + '_method' => 'PATCH', + '_action' => '/blog/edit', + '_submit' => 'Update', + '_blog' => $this->blog, )); ?>
input(array( 'type' => 'submit', - 'value' => $submit, + 'value' => $this->_submit, )); ?>