X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FMailing%2FBAO%2FComponent.php;fp=CRM%2FMailing%2FBAO%2FComponent.php;h=05d87cee7dd55a23739fac1fa183dea383bdf9a6;hb=b71cb96619f284fb007d4365c33f59f088573d8f;hp=3da5da0dbcaeb0dc2a9431a4f498dfce99bd8d81;hpb=592ed22c9447a2ac8f8558de48349f946b8e4ed6;p=civicrm-core.git diff --git a/CRM/Mailing/BAO/Component.php b/CRM/Mailing/BAO/Component.php index 3da5da0dbc..05d87cee7d 100644 --- a/CRM/Mailing/BAO/Component.php +++ b/CRM/Mailing/BAO/Component.php @@ -1,7 +1,7 @@ copyValues($params); if ($component->find(TRUE)) { @@ -66,30 +62,32 @@ class CRM_Mailing_BAO_Component extends CRM_Mailing_DAO_Component { } /** - * update the is_active flag in the db + * Update the is_active flag in the db. * - * @param int $id id of the database record - * @param boolean $is_active value we want to set the is_active field + * @param int $id + * Id of the database record. + * @param bool $is_active + * Value we want to set the is_active field. * - * @return Object DAO object on sucess, null otherwise - * @static + * @return Object + * DAO object on sucess, null otherwise */ - static function setIsActive($id, $is_active) { + public static function setIsActive($id, $is_active) { return CRM_Core_DAO::setFieldValue('CRM_Mailing_DAO_Component', $id, 'is_active', $is_active); } /** - * Create and Update mailing component + * Create and Update mailing component. * - * @param array $params (reference ) an assoc array of name/value pairs - * @param array $ids (deprecated) the array that holds all the db ids + * @param array $params + * (reference ) an assoc array of name/value pairs. + * @param array $ids + * (deprecated) the array that holds all the db ids. * - * @return object CRM_Mailing_BAO_Component object + * @return CRM_Mailing_BAO_Component * - * @access public - * @static */ - static function add(&$params, $ids = array()) { + public static function add(&$params, $ids = array()) { $id = CRM_Utils_Array::value('id', $params, CRM_Utils_Array::value('id', $ids)); $component = new CRM_Mailing_DAO_Component(); if ($id) { @@ -122,4 +120,5 @@ class CRM_Mailing_BAO_Component extends CRM_Mailing_DAO_Component { $component->save(); return $component; } + }