+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
class CRM_Core_BAO_Note extends CRM_Core_DAO_Note {
/**
- * Const the max number of notes we display at any given time
+ * Const the max number of notes we display at any given time.
* @var int
*/
const MAX_NOTES = 3;
* @param object $note
* Either the id of the note to retrieve, or the CRM_Core_DAO_Note object itself.
*
- * @return boolean
+ * @return bool
* TRUE if the note should be displayed, otherwise FALSE
*
*/
}
/**
- * Takes an associative array and creates a note object
+ * Takes an associative array and creates a note object.
*
* the function extract all the params it needs to initialize the create a
* note object. the params array could contain additional unused name/value
* @return object
* $note CRM_Core_BAO_Note object
*/
- public static function &add(&$params, $ids = array()) {
+ public static function add(&$params, $ids = array()) {
$dataExists = self::dataExists($params);
if (!$dataExists) {
return CRM_Core_DAO::$_nullObject;
}
/**
- * Check if there is data to create the object
+ * Check if there is data to create the object.
*
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
- * @return boolean
+ * @return bool
*/
public static function dataExists(&$params) {
// return if no data present
}
/**
- * Delete the notes
+ * Delete the notes.
*
* @param int $id
* Note id.
}
/**
- * Delete all records for this contact id
+ * Delete all records for this contact id.
*
* @param int $id
* ID of the contact for which note needs to be deleted.
}
/**
- * Get log record count for a Contact
+ * Get log record count for a Contact.
*
* @param int $contactID
*
}
/**
- * Get all descendent notes of the note with given ID
+ * Get all descendent notes of the note with given ID.
*
* @param int $parentId
* ID of the note to start from.
}
/**
- * Get total count of direct children visible to the current user
+ * Get total count of direct children visible to the current user.
*
* @param int $id
* Note ID.
}
/**
- * Recursive function to get all descendent notes of the note with given ID
+ * Recursive function to get all descendent notes of the note with given ID.
*
* @param int $parentId
* ID of the note to start from.
}
/**
- * Delete all note related to contact when contact is deleted
+ * Delete all note related to contact when contact is deleted.
*
* @param int $contactID
* Contact id whose notes to be deleted.
self::del($contactNoteId->id, FALSE);
}
}
+
}