From 8aa27c48cd1b620e3a7dee1e2de2cdc67f4e9874 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Sun, 22 May 2011 14:43:11 +0000 Subject: branch 3.1: misc doc updates --- demos/quickstart/protected/pages/Advanced/I18N.page | 6 +++--- .../protected/pages/Configurations/UrlMapping.page | 6 +++--- .../protected/pages/Controls/TabPanel.page | 14 +++++++------- .../protected/pages/Database/ActiveRecord.page | 20 ++++++++++---------- .../protected/pages/GettingStarted/NewFeatures.page | 6 +++--- 5 files changed, 26 insertions(+), 26 deletions(-) (limited to 'demos') diff --git a/demos/quickstart/protected/pages/Advanced/I18N.page b/demos/quickstart/protected/pages/Advanced/I18N.page index 5d3e05b5..1840e69b 100644 --- a/demos/quickstart/protected/pages/Advanced/I18N.page +++ b/demos/quickstart/protected/pages/Advanced/I18N.page @@ -78,10 +78,10 @@ The marker value is used to surround any untranslated text. Each translation message is wrapped within a trans-unit tag, where source is the original message, and target is the translated message. Editors such as Heartsome XLIFF Translation Editor can help in editing these XML files. -

Using a Database for translation

+

Using a Database for translation

-

Since version 3.1.3 the messages can also be stored in a database using the connection id from an existing TDataSourceConfig. You have to create two tables in your database: catalogue and trans_unit. The catalogue table needs an entry for each catalogue you want to use. Example schemas for different databases can be found in the framework's I18N/schema directory. To configure translation with a database use: +

Since version 3.1.3 the messages can also be stored in a database using the connection id from an existing TDataSourceConfig. You have to create two tables in your database: catalogue and trans_unit. The catalogue table needs an entry for each catalogue you want to use. Example schemas for different databases can be found in the framework's I18N/schema directory. To configure translation with a database use: @@ -97,7 +97,7 @@ Each translation message is wrapped within a trans-unit tag, where -

The translation messages will be stored in the trans_unit table. Add your translation in the target field of that table. You should make sure that you are working on the right catalogue by comparing the message's cat_id with that from the catalogue table.

+

The translation messages will be stored in the trans_unit table. Add your translation in the target field of that table. You should make sure that you are working on the right catalogue by comparing the message's cat_id with that from the catalogue table.

Setting and Changing Culture

Once globalization is enabled, you can access the globalization settings, such as, Culture, Charset, etc, using

diff --git a/demos/quickstart/protected/pages/Configurations/UrlMapping.page b/demos/quickstart/protected/pages/Configurations/UrlMapping.page index bdd0b81d..6bbedc28 100644 --- a/demos/quickstart/protected/pages/Configurations/UrlMapping.page +++ b/demos/quickstart/protected/pages/Configurations/UrlMapping.page @@ -133,9 +133,9 @@ parameters with these patterns if a lot of pages share common parameters.

-

As above, put more specific rules before more common rules as the first matching rule will be used.

+

As above, put more specific rules before more common rules as the first matching rule will be used.

-

To make configuration of friendly URLs for multiple pages even easier, you can also use UrlFormat="Path" +

To make configuration of friendly URLs for multiple pages even easier, you can also use UrlFormat="Path" in combination with wildcard patterns. In fact, this feature only is available in combination with wildcard rules:

@@ -160,7 +160,7 @@ Since version 3.1.1, TUrlMapping starts to support constructing customi

A matching pattern is one whose ServiceID and ServiceParameter properties are the same as those passed to constructUrl() and whose named parameters are found in the GET variables. For example, constructUrl('Posts.ListPost',array('cat'=>2)) will use the third pattern in the above example. -

+

By default, TUrlMapping will construct URLs prefixed with the currently requesting PHP script path, such as /path/to/index.php/article/3. Users may change this behavior by explicitly specifying the URL prefix through its UrlPrefix property. For example, if the Web server configuration treats index.php as the default script, we can set UrlPrefix as /path/to and the constructed URL will look like /path/to/article/3. diff --git a/demos/quickstart/protected/pages/Controls/TabPanel.page b/demos/quickstart/protected/pages/Controls/TabPanel.page index d85de681..69309931 100644 --- a/demos/quickstart/protected/pages/Controls/TabPanel.page +++ b/demos/quickstart/protected/pages/Controls/TabPanel.page @@ -1,13 +1,13 @@ -

TTabPanel

+

TTabPanel

-

+

TTabPanel displays a tabbed panel. Users can click on the tab bar to switching among different tab views. Each tab view is an independent panel that can contain arbitrary content.

-

+

A TTabPanel control consists of one or several TTabView controls representing the possible tab views. At any time, only one tab view is visible (active), which is specified by any of the following properties:

@@ -17,11 +17,11 @@ A TTabPanel control consists of one or several TTabView contro
  • ActiveView - the visible view instance.
  • -

    +

    If both ActiveViewIndex and ActiveViewID are set, the latter takes precedence.

    -

    +

    TTabPanel uses CSS to specify the appearance of the tab bar and panel. By default, an embedded CSS file will be published which contains the default CSS for TTabPanel. You may also use your own CSS file by specifying the CssUrl property. The following properties specify the CSS classes used for elements in a TTabPanel:

    @@ -32,11 +32,11 @@ If both ActiveViewIndex and ActiveViewID are set, the latter t
  • ViewCssClass - the CSS class for the div element enclosing view content (defaults to 'tab-view');
  • -

    +

    To use TTabPanel, write a template like following:

    - + <com:TTabPanel> <com:TTabView Caption="View 1"> content for view 1 diff --git a/demos/quickstart/protected/pages/Database/ActiveRecord.page b/demos/quickstart/protected/pages/Database/ActiveRecord.page index bc0df529..78947faf 100644 --- a/demos/quickstart/protected/pages/Database/ActiveRecord.page +++ b/demos/quickstart/protected/pages/Database/ActiveRecord.page @@ -50,16 +50,16 @@
  • Fetch relationships (related foreign objects) such as "has many", "has one", "belongs to" and "many to many" via association table.
  • Lazy loading of relationships.
  • -

    Design Implications

    -

    +

    Design Implications

    +

    Prado's implementation of Active Record does not maintain referential identity. Each object obtained using Active Record is a copy of the data in the database. For example, If you ask for a particular customer and get back a Customer object, the next time you ask for that customer you get back another instance of a Customer object. This implies that a strict comparison (i.e., using ===) will return false, while loose comparison (i.e., using ==) will return true if the object values are equal by loose comparison. -

    -

    +

    +

    This is design implication related to the following question. "Do you think of the customer as an object, of which there's only one, or do you think of the objects you operate on as copies of the database?" @@ -876,8 +876,8 @@ class Category extends TActiveRecord } -

    Query Criteria for Related Objects

    -

    +

    Query Criteria for Related Objects

    +

    In the above, we show that an Active Record object can reference to its related objects by declaring a static class member $RELATIONS which specifies a list of relations. Each relation is specified as an array consisting of three elements: relation type, related AR class name, @@ -1147,14 +1147,14 @@ arrays. E.g. $player->skills[] = new SkillRecord(). If array w will be thrown.

    -

    Column Mapping

    -

    +

    Column Mapping

    +

    Since v3.1.1, Active Record starts to support column mapping. Column mapping allows developers to address columns in Active Record using a more consistent naming convention. In particular, using column mapping, one can access a column using whatever name he likes, rather than limited by the name defined in the database schema.

    -

    +

    To use column mapping, declare a static array named COLUMN_MAPPING in the Active Record class. The keys of the array are column names (called physical column names) as defined in the database schema, while the values are corresponding property names (called logical column names) defined @@ -1181,7 +1181,7 @@ class UserRecord extends TActiveRecord //.... } -

    +

    With the above column mapping, we can address first_name using $userRecord->firstName instead of $userRecord->first_name. This helps separation of logic and model.

    diff --git a/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page b/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page index 51dbb981..8d509bdb 100644 --- a/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page +++ b/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page @@ -6,19 +6,19 @@ This page summarizes the main new features that are introduced in each PRADO release.

    -

    Version 3.1.3

    +

    Version 3.1.3

    -

    Version 3.1.2

    +

    Version 3.1.2

    • Added a new active control TActivePager that allows to paginate a databound control with an ajax callback.
    • Added TFirebugLogRoute to send logs to the Firebug console
    -

    Version 3.1.1

    +

    Version 3.1.1

    • Added a new control TTabPanel that displays tabbed views.
    • Added a new control TKeyboard that displays a virtual keyboard for text input.
    • -- cgit v1.2.3