Permalink
Browse files

Updating doc blocks to improve parsing in the API.

  • Loading branch information...
1 parent c47e899 commit 51e471427a8480f6858dd5fce3c5500254627004 @markstory markstory committed Oct 6, 2009
Showing with 15 additions and 8 deletions.
  1. +3 −1 cake/libs/model/behaviors/containable.php
  2. +12 −7 cake/libs/model/model.php
@@ -77,8 +77,9 @@ function setup(&$Model, $settings = array()) {
* Runs before a find() operation. Used to allow 'contain' setting
* as part of the find call, like this:
*
- * Model->find('all', array('contain' => array('Model1', 'Model2')));
+ * `Model->find('all', array('contain' => array('Model1', 'Model2')));`
*
+ * {{{
* Model->find('all', array('contain' => array(
* 'Model1' => array('Model11', 'Model12'),
* 'Model2',
@@ -87,6 +88,7 @@ function setup(&$Model, $settings = array()) {
* 'Model32',
* 'Model33' => array('Model331', 'Model332')
* )));
+ * }}}
*
* @param object $Model Model using the behavior
* @param array $query Query parameters as set by cake
View
@@ -453,7 +453,7 @@ function call__($method, $params) {
*
* @param mixed $model A model or association name (string) or set of binding options (indexed by model name type)
* @param array $options If $model is a string, this is the list of association properties with which $model will
- * be bound
+ * be bound
* @param boolean $permanent Set to true to make the binding permanent
* @return void
* @access public
@@ -1909,14 +1909,19 @@ function hasAny($conditions = null) {
* second parameter options for finding ( indexed array, including: 'conditions', 'limit',
* 'recursive', 'page', 'fields', 'offset', 'order')
*
- * Eg: find('all', array(
- * 'conditions' => array('name' => 'Thomas Anderson'),
- * 'fields' => array('name', 'email'),
- * 'order' => 'field3 DESC',
- * 'recursive' => 2,
- * 'group' => 'type'));
+ * Eg:
+ * {{{
+ * find('all', array(
+ * 'conditions' => array('name' => 'Thomas Anderson'),
+ * 'fields' => array('name', 'email'),
+ * 'order' => 'field3 DESC',
+ * 'recursive' => 2,
+ * 'group' => 'type'
+ * ));
+ * }}}
*
* Specifying 'fields' for new-notation 'list':
+ *
* - If no fields are specified, then 'id' is used for key and 'model->displayField' is used for value.
* - If a single field is specified, 'id' is used for key and specified field is used for value.
* - If three fields are specified, they are used (in order) for key, value and group.

0 comments on commit 51e4714

Please sign in to comment.