summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Database
diff options
context:
space:
mode:
authorDaniel <darthdaniel85@gmail.com>2015-01-28 16:37:20 -0500
committerDaniel <darthdaniel85@gmail.com>2015-01-28 16:37:20 -0500
commit2f66ee3b7420de94b640ea528778005571dbf5a5 (patch)
treeead4cacbc47c7918a5bf1942f68cbb9aeb154dd4 /demos/quickstart/protected/pages/Database
parent68c81d74a593d8e0225078d6982f9b5fe4986d2a (diff)
Views -AR Classes Update Documentation 50%
Diffstat (limited to 'demos/quickstart/protected/pages/Database')
-rw-r--r--demos/quickstart/protected/pages/Database/ViewsArUpdate.page28
1 files changed, 28 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Database/ViewsArUpdate.page b/demos/quickstart/protected/pages/Database/ViewsArUpdate.page
new file mode 100644
index 00000000..a2f7ff68
--- /dev/null
+++ b/demos/quickstart/protected/pages/Database/ViewsArUpdate.page
@@ -0,0 +1,28 @@
+<com:TContent ID="body" >
+<h1 id="138046">Views - AR Classes Update</h1>
+<com:SinceVersion Version="4.0" />
+<p class="block-content">
+ Usually when have <tt>Active Records Classes</tt>
+ there are correspondingly the proper views to handle them.
+</p>
+
+<com:TTextHighlighter CssClass="source block-content">
+$student = AR_Student::finder()->findByPk(1);
+$this->tryToUpdateView($student);
+</com:TTextHighlighter>
+
+<p class="block-content">
+ Also you can do the reverse operation.
+</p>
+
+<com:TTextHighlighter CssClass="source block-content">
+$student = new AR_Student();
+$this->tryToUpdateAR($student);
+$student->save();
+</com:TTextHighlighter>
+
+<div class="info"><b class="note">Info:</b>
+ When an AR class attribute does not match any of the controls IDs on the view, nothing will happen
+</div>
+
+</com:TContent> \ No newline at end of file