summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages')
-rw-r--r--demos/quickstart/protected/pages/Advanced/Collections.page12
-rw-r--r--demos/quickstart/protected/pages/Configurations/Templates3.page14
-rw-r--r--demos/quickstart/protected/pages/Search.page18
-rw-r--r--demos/quickstart/protected/pages/Search.php7
4 files changed, 21 insertions, 30 deletions
diff --git a/demos/quickstart/protected/pages/Advanced/Collections.page b/demos/quickstart/protected/pages/Advanced/Collections.page
index 181dc556..7fc3443d 100644
--- a/demos/quickstart/protected/pages/Advanced/Collections.page
+++ b/demos/quickstart/protected/pages/Advanced/Collections.page
@@ -1,6 +1,6 @@
<com:TContent ID="body" >
-<h1>Collections</h1>
+<h1 id="5501">Collections</h1>
<p>
Collection is a basic data structure in programming. In traditional PHP programming, array is used widely to represent collection data structure. A PHP array is a mix of cardinal-indxed array and hash table.
</p>
@@ -8,7 +8,7 @@ Collection is a basic data structure in programming. In traditional PHP programm
To enable object-oriented manipulation of collections, PRADO provides a set of powerful collection classes. Among them, the <tt>TList</tt> and <tt>TMap</tt> are the most fundamental and usually serve as the base classes for other collection classes. Since many PRADO components have properties that are of collection type, it is very important for developers to master the usage of PRADO collection classes.
</p>
-<h2>Using <tt>TList</tt></h2>
+<h2 id="5502">Using <tt>TList</tt></h2>
<p>
A <tt>TList</tt> object represents a cardinal-indexed array, i.e., an array (object) with the index 0, 1, 2, ...
</p>
@@ -42,7 +42,7 @@ In addition, <tt>TList</tt> implements a few commonly used convenient methods fo
<li><tt>mergeWith()</tt>: appends the list with data from an array or traversable object (including <tt>TList</tt>).</li>
</ul>
-<h3>Using <tt>TList</tt>-based component properties</h3>
+<h3 id="5504">Using <tt>TList</tt>-based component properties</h3>
<p>
As aforementioned, many PRADO component properties are based on <tt>TList</tt> or <tt>TList</tt>-derived collection classes. These properties all share the above usages.
</p>
@@ -62,7 +62,7 @@ foreach($control->Controls as $childControl) ...
Another example is the <tt>Items</tt> property, available in list controls, <tt>TRepeater</tt>, <tt>TDataList</tt> and <tt>TDataGrid</tt>. In these controls, the ancestor class of <tt>Items</tt> is <tt>TList</tt>.
</p>
-<h3>Extending <tt>TList</tt></h3>
+<h3 id="5505">Extending <tt>TList</tt></h3>
<p>
Often, we want to extend <tt>TList</tt> to perform additional operations for each addition or removal of an item. The only methods that the child class needs to override are <tt>insertAt()</tt> and <tt>removeAt()</tt>. For example, to ensure the list only contains items that are of <tt>TControl</tt> type, we can override <tt>insertAt()</tt> as follows,
</p>
@@ -77,7 +77,7 @@ public function insertAt($index,$item)
</com:TTextHighlighter>
-<h2>Using <tt>TMap</tt></h2>
+<h2 id="5503">Using <tt>TMap</tt></h2>
<p>
A <tt>TMap</tt> object represents a hash table (or we say string-indexed array).
</p>
@@ -107,7 +107,7 @@ The following methods are provided by <tt>TMap</tt> for convenience,
<li><tt>mergeWith()</tt>: appends the map with data from an array or traversable object (including <tt>TMap</tt>).</li>
</ul>
-<h3>Using of <tt>TAttributeCollection</tt></h3>
+<h3 id="5506">Using of <tt>TAttributeCollection</tt></h3>
<p>
<tt>TAttributeCollection</tt> is a special class extending from <tt>TMap</tt>. It is mainly used by the <tt>Attributes</tt> property of <tt>TControl</tt>.
</p>
diff --git a/demos/quickstart/protected/pages/Configurations/Templates3.page b/demos/quickstart/protected/pages/Configurations/Templates3.page
index 99d43665..bc3b1f87 100644
--- a/demos/quickstart/protected/pages/Configurations/Templates3.page
+++ b/demos/quickstart/protected/pages/Configurations/Templates3.page
@@ -44,6 +44,20 @@ The format of databind tags is as follows,
<com:TTextHighlighter Language="prado" CssClass="source">
&lt;%# PhpExpression %&gt;
</com:TTextHighlighter>
+<p>
+Since v3.0.2, expression tags and databind tags can be embedded within static strings. For example, you can write the following in a template,
+</p>
+<com:TTextHighlighter Language="prado" CssClass="source">
+&lt;com:TLabel&gt;
+ &lt;prop:Text&gt;
+ Today is &lt;%= date('F d, Y',time()) &gt;.
+ The page class is &lt;%= get_class($this) %&gt;.
+ &lt;/prop:Text&gt;
+&lt;/com:TLabel&gt;
+</com:TTextHighlighter>
+<p>
+Previously, you would have to use a single expression with string concatenations to achieve the same effect.
+</p>
<a name="pt"></a>
<h3 id="1705">Parameter Tags</h3>
diff --git a/demos/quickstart/protected/pages/Search.page b/demos/quickstart/protected/pages/Search.page
index d3391222..ae7f07bc 100644
--- a/demos/quickstart/protected/pages/Search.page
+++ b/demos/quickstart/protected/pages/Search.page
@@ -4,24 +4,6 @@
<com:SearchBox ID="search" />
</div>
- <com:TRepeater id="api_results">
- <prop:HeaderTemplate>
- <div class="searchHeader">
- Found <%# $this->Parent->Data->Count %> classes in API documentation.
- </div>
- </prop:HeaderTemplate>
- <prop:ItemTemplate>
- <div class="searchAPIItem">
- <div class="searchItemLink">
- <%# $this->ItemIndex + 1 %>.
- <a href="http://www.pradosoft.com/docs/manual/<%# $this->DataItem->link %>">
- <%# $this->DataItem->title %>
- </a>
- </div>
- </div>
- </prop:ItemTemplate>
- </com:TRepeater>
-
<com:TRepeater id="quickstart_results">
<prop:HeaderTemplate>
<div class="searchHeader">
diff --git a/demos/quickstart/protected/pages/Search.php b/demos/quickstart/protected/pages/Search.php
index 297d2f50..f1d07ffa 100644
--- a/demos/quickstart/protected/pages/Search.php
+++ b/demos/quickstart/protected/pages/Search.php
@@ -13,13 +13,8 @@ class Search extends TPage
$hits_1 = $quickstart->find($text);
$this->quickstart_results->setDataSource($hits_1);
$this->quickstart_results->dataBind();
-
- $api = $this->getApplication()->getModule("api_search");
- $hits_2 = $api->find($text);
- $this->api_results->setDataSource($hits_2);
- $this->api_results->dataBind();
- $this->emptyResult->setVisible(count($hits_1)+count($hits_2) == 0);
+ $this->emptyResult->setVisible(!count($hits_1));
}
}