Skip to content
Permalink
Browse files

Fixing all @link annotations in model class

  • Loading branch information...
lorenzo committed Oct 15, 2011
1 parent d406889 commit d1a530f53b9c89f95b4f979f9f862eb2495d2ed6
Showing with 49 additions and 51 deletions.
  1. +1 −1 lib/Cake/Model/Behavior/TranslateBehavior.php
  2. +12 −13 lib/Cake/Model/Behavior/TreeBehavior.php
  3. +36 −37 lib/Cake/Model/Model.php
@@ -23,7 +23,7 @@
* Translate behavior
*
* @package Cake.Model.Behavior
* @link http://book.cakephp.org/view/1328/Translate
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/translate.html
*/
class TranslateBehavior extends ModelBehavior {
@@ -26,7 +26,7 @@
*
* @see http://en.wikipedia.org/wiki/Tree_traversal
* @package Cake.Model.Behavior
* @link http://book.cakephp.org/view/1339/Tree
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html
*/
class TreeBehavior extends ModelBehavior {
@@ -200,7 +200,7 @@ public function beforeSave($Model) {
* @param mixed $id The ID of the record to read or false to read all top level nodes
* @param boolean $direct whether to count direct, or all, children
* @return integer number of child nodes
* @link http://book.cakephp.org/view/1347/Counting-children
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::childCount
*/
public function childCount($Model, $id = null, $direct = false) {
if (is_array($id)) {
@@ -246,7 +246,7 @@ public function childCount($Model, $id = null, $direct = false) {
* @param integer $page Page number, for accessing paged data
* @param integer $recursive The number of levels deep to fetch associated records
* @return array Array of child nodes
* @link http://book.cakephp.org/view/1346/Children
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::children
*/
public function children($Model, $id = null, $direct = false, $fields = null, $order = null, $limit = null, $page = 1, $recursive = null) {
if (is_array($id)) {
@@ -303,7 +303,7 @@ public function children($Model, $id = null, $direct = false, $fields = null, $o
* @param string $spacer The character or characters which will be repeated
* @param integer $recursive The number of levels deep to fetch associated records
* @return array An associative array of records, where the id is the key, and the display field is the value
* @link http://book.cakephp.org/view/1348/generatetreelist
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::generateTreeList
*/
public function generateTreeList($Model, $conditions = null, $keyPath = null, $valuePath = null, $spacer = '_', $recursive = null) {
$overrideRecursive = $recursive;
@@ -359,7 +359,7 @@ public function generateTreeList($Model, $conditions = null, $keyPath = null, $v
* @param string|array $fields
* @param integer $recursive The number of levels deep to fetch associated records
* @return array|boolean Array of data for the parent node
* @link http://book.cakephp.org/view/1349/getparentnode
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::getParentNode
*/
public function getParentNode($Model, $id = null, $fields = null, $recursive = null) {
if (is_array($id)) {
@@ -392,7 +392,7 @@ public function getParentNode($Model, $id = null, $fields = null, $recursive = n
* @param mixed $fields Either a single string of a field name, or an array of field names
* @param integer $recursive The number of levels deep to fetch associated records
* @return array Array of nodes from top most parent to current node
* @link http://book.cakephp.org/view/1350/getpath
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::getPath
*/
public function getPath($Model, $id = null, $fields = null, $recursive = null) {
if (is_array($id)) {
@@ -429,7 +429,7 @@ public function getPath($Model, $id = null, $fields = null, $recursive = null) {
* @param mixed $id The ID of the record to move
* @param integer|boolean $number how many places to move the node or true to move to last position
* @return boolean true on success, false on failure
* @link http://book.cakephp.org/view/1352/moveDown
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::moveDown
*/
public function moveDown($Model, $id = null, $number = 1) {
if (is_array($id)) {
@@ -487,7 +487,7 @@ public function moveDown($Model, $id = null, $number = 1) {
* @param mixed $id The ID of the record to move
* @param integer|boolean $number how many places to move the node, or true to move to first position
* @return boolean true on success, false on failure
* @link http://book.cakephp.org/view/1353/moveUp
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::moveUp
*/
public function moveUp($Model, $id = null, $number = 1) {
if (is_array($id)) {
@@ -551,7 +551,7 @@ public function moveUp($Model, $id = null, $number = 1) {
* @param mixed $missingParentAction 'return' to do nothing and return, 'delete' to
* delete, or the id of the parent to set as the parent_id
* @return boolean true on success, false on failure
* @link http://book.cakephp.org/view/1628/Recover
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::recover
*/
public function recover($Model, $mode = 'parent', $missingParentAction = null) {
if (is_array($mode)) {
@@ -630,8 +630,7 @@ public function recover($Model, $mode = 'parent', $missingParentAction = null) {
* @param Model $Model Model instance
* @param array $options array of options to use in reordering.
* @return boolean true on success, false on failure
* @link http://book.cakephp.org/view/1355/reorder
* @link http://book.cakephp.org/view/1629/Reorder
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::reorder
*/
public function reorder($Model, $options = array()) {
$options = array_merge(array('id' => null, 'field' => $Model->displayField, 'order' => 'ASC', 'verify' => true), $options);
@@ -670,7 +669,7 @@ public function reorder($Model, $options = array()) {
* @param mixed $id The ID of the record to remove
* @param boolean $delete whether to delete the node after reparenting children (if any)
* @return boolean true on success, false on failure
* @link http://book.cakephp.org/view/1354/removeFromTree
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::removeFromTree
*/
public function removeFromTree($Model, $id = null, $delete = false) {
if (is_array($id)) {
@@ -741,7 +740,7 @@ public function removeFromTree($Model, $id = null, $delete = false) {
* @param Model $Model Model instance
* @return mixed true if the tree is valid or empty, otherwise an array of (error type [index, node],
* [incorrect left/right index,node id], message)
* @link http://book.cakephp.org/view/1630/Verify
* @link http://book.cakephp.org/2.0/en/core-libraries/behaviors/tree.html#TreeBehavior::verify
*/
public function verify($Model) {
extract($this->settings[$Model->alias]);
Oops, something went wrong.

0 comments on commit d1a530f

Please sign in to comment.
You can’t perform that action at this time.