Skip to content

Commit

Permalink
Merge pull request cakephp#747 from cakephp/restructure-tocs
Browse files Browse the repository at this point in the history
Restructure & add TOCs to more places.
  • Loading branch information
lorenzo committed Sep 3, 2013
2 parents 515ffc6 + 0f4cd54 commit a1fddc3
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 86 deletions.
2 changes: 1 addition & 1 deletion config/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['themes']
exclude_patterns = ['themes', 'pdf-contents.rst', 'core-libraries/components/email.rst']

# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
Expand Down
11 changes: 2 additions & 9 deletions en/controllers/components.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,8 @@ in a component.
CakePHP also comes with a fantastic set of core components you can
use to aid in:


- Security
- Sessions
- Access control lists
- Emails
- Cookies
- Authentication
- Request handling
- Pagination
.. include:: /core-libraries/toc-components.rst
:start-line: 7

Each of these core components are detailed in their own chapters.
For now, we’ll show you how to create your own components. Creating
Expand Down
29 changes: 11 additions & 18 deletions en/core-libraries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,9 @@ CakePHP.
Behaviors
=========

Behaviors add extra functionality to your models. CakePHP comes
with a number of built-in behaviors such as :php:class:`TreeBehavior`
and :php:class:`ContainableBehavior`.

To learn about creating and using behaviors, read the section
on :doc:`/models/behaviors`.
.. include:: /core-libraries/toc-behaviors.rst
:start-line: 3
:end-before: toctree

.. toctree::
:maxdepth: 2
Expand All @@ -38,32 +35,28 @@ on :doc:`/models/behaviors`.
Components
==========

CakePHP has a selection of components to help take care of basic tasks in your
controllers. See the section on :doc:`/controllers/components` for how to
configure and use components.
.. include:: /core-libraries/toc-components.rst
:start-line: 3
:end-before: toctree

.. toctree::
:maxdepth: 2

core-libraries/toc-components
/core-libraries/toc-components

.. _core-helpers:

Helpers
=======

CakePHP features a number of helpers that aid in view creation. They assist in
creating well-formed markup (including forms), aid in formatting text, times and
numbers, and can even integrate with popular javascript libraries. Here is a
summary of the built-in helpers.

Read :doc:`/views/helpers` to learn more about helpers, their api, and how you
can create and use your own helpers.
.. include:: /core-libraries/toc-helpers.rst
:start-line: 3
:end-before: toctree

.. toctree::
:maxdepth: 2

core-libraries/toc-helpers
/core-libraries/toc-helpers

Utilities
=========
Expand Down
17 changes: 12 additions & 5 deletions en/core-libraries/toc-behaviors.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
Behaviors
#########

Behaviors add extra functionality to your models. CakePHP comes
with a number of built-in behaviors such as :php:class:`TreeBehavior`
and :php:class:`ContainableBehavior`.

To learn about creating and using behaviors, read the section
on :doc:`/models/behaviors`.

.. toctree::
:maxdepth: 2
:maxdepth: 1

behaviors/acl
behaviors/containable
behaviors/translate
behaviors/tree
/core-libraries/behaviors/acl
/core-libraries/behaviors/containable
/core-libraries/behaviors/translate
/core-libraries/behaviors/tree
21 changes: 12 additions & 9 deletions en/core-libraries/toc-components.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
Components
##########

CakePHP has a selection of components to help take care of basic tasks in your
controllers. See the section on :doc:`/controllers/components` for how to
configure and use components.

.. toctree::
:maxdepth: 2
:maxdepth: 1

components/access-control-lists
components/authentication
components/cookie
components/email
components/request-handling
components/pagination
components/security-component
components/sessions
/core-libraries/components/pagination
/core-libraries/components/sessions
/core-libraries/components/authentication
/core-libraries/components/security-component
/core-libraries/components/request-handling
/core-libraries/components/cookie
/core-libraries/components/access-control-lists
30 changes: 19 additions & 11 deletions en/core-libraries/toc-helpers.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
Helpers
#######

CakePHP features a number of helpers that aid in view creation. They assist in
creating well-formed markup (including forms), aid in formatting text, times and
numbers, and can even integrate with popular javascript libraries. Here is a
summary of the built-in helpers.

Read :doc:`/views/helpers` to learn more about helpers, their api, and how you
can create and use your own helpers.

.. toctree::
:maxdepth: 2
:maxdepth: 1

helpers/cache
helpers/form
helpers/html
helpers/js
helpers/number
helpers/paginator
helpers/rss
helpers/session
helpers/text
helpers/time
/core-libraries/helpers/cache
/core-libraries/helpers/form
/core-libraries/helpers/html
/core-libraries/helpers/js
/core-libraries/helpers/number
/core-libraries/helpers/paginator
/core-libraries/helpers/rss
/core-libraries/helpers/session
/core-libraries/helpers/text
/core-libraries/helpers/time
4 changes: 2 additions & 2 deletions en/models/associations-linking-models-together.rst
Original file line number Diff line number Diff line change
Expand Up @@ -696,8 +696,8 @@ Possible keys for HABTM association arrays include:
- **offset**: The number of associated rows to skip over (given
the current conditions and order) before fetching and associating.
- **finderQuery**: A complete SQL query CakePHP can use to fetch associated
model records. This should be used in situations that require very custom
results.
model records. This should be used in situations that require very custom
results.

Once this association has been defined, find operations on the
Recipe model will also fetch related Tag records if they exist::
Expand Down
6 changes: 6 additions & 0 deletions en/models/behaviors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ and how to create our own.
In essence, Behaviors are
`Mixins <http://en.wikipedia.org/wiki/Mixin>`_ with callbacks.

There are a number of Behaviors included in CakePHP. To find out more about each
one, reference the chapters below:

.. include:: /core-libraries/toc-behaviors.rst
:start-line: 10

Using Behaviors
===============

Expand Down
35 changes: 4 additions & 31 deletions en/views/helpers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ CakePHP features a number of helpers that aid in view creation.
They assist in creating well-formed markup (including forms), aid
in formatting text, times and numbers, and can even speed up Ajax
functionality. For more information on the helpers included in CakePHP,
check out :ref:`core-helpers`.
check out the chapter for each helper:

.. include:: /core-libraries/toc-helpers.rst
:start-line: 11

.. _configuring-helpers:

Expand Down Expand Up @@ -296,36 +299,6 @@ Callbacks
Is called after layout rendering is complete. Receives the layout filename as an
argument.

Core Helpers
============

:doc:`/core-libraries/helpers/cache`
Used by the core to cache view content.
:doc:`/core-libraries/helpers/form`
Creates HTML forms and form elements that self populate and handle
validation problems.
:doc:`/core-libraries/helpers/html`
Convenience methods for crafting well-formed markup. Images, links,
tables, header tags and more.
:doc:`/core-libraries/helpers/js`
Used to create Javascript compatible with various Javascript
libraries.
:doc:`/core-libraries/helpers/number`
Number and currency formatting.
:doc:`/core-libraries/helpers/paginator`
Model data pagination and sorting.
:doc:`/core-libraries/helpers/rss`
Convenience methods for outputting RSS feed XML data.
:doc:`/core-libraries/helpers/session`
Access for reading session values in views.
:doc:`/core-libraries/helpers/text`
Smart linking, highlighting, word smart truncation.
:doc:`/core-libraries/helpers/time`
Proximity detection (is this next year?), nice string
formatting(Today, 10:30 am) and time zone conversion.



.. meta::
:title lang=en: Helpers
:keywords lang=en: php class,time function,presentation layer,processing power,ajax,markup,array,functionality,logic,syntax,elements,cakephp,plugins

0 comments on commit a1fddc3

Please sign in to comment.