* Class constructor
*/
public function __construct() {
- parent::__construct( );
+ parent::__construct();
}
/**
* @static
*/
public static function retrieve(&$params, &$defaults) {
- $financialType = new CRM_Financial_DAO_FinancialType( );
- $financialType->copyValues( $params );
+ $financialType = new CRM_Financial_DAO_FinancialType();
+ $financialType->copyValues($params);
if ($financialType->find(TRUE)) {
- CRM_Core_DAO::storeValues( $financialType, $defaults );
+ CRM_Core_DAO::storeValues($financialType, $defaults);
return $financialType;
}
return NULL;
* @param bool $is_active
* Value we want to set the is_active field.
*
- * @return Object DAO object on sucess, null otherwise
+ * @return Object
+ * DAO object on sucess, null otherwise
* @static
*/
public static function setIsActive($id, $is_active) {
- return CRM_Core_DAO::setFieldValue( 'CRM_Financial_DAO_FinancialType', $id, 'is_active', $is_active );
+ return CRM_Core_DAO::setFieldValue('CRM_Financial_DAO_FinancialType', $id, 'is_active', $is_active);
}
/**
* @return object
*/
public static function add(&$params, &$ids = array()) {
- if(empty($params['id'])) {
+ if (empty($params['id'])) {
$params['is_active'] = CRM_Utils_Array::value('is_active', $params, FALSE);
$params['is_deductible'] = CRM_Utils_Array::value('is_deductible', $params, FALSE);
$params['is_reserved'] = CRM_Utils_Array::value('is_reserved', $params, FALSE);
* @static
*/
public static function del($financialTypeId) {
- $financialType = new CRM_Financial_DAO_FinancialType( );
+ $financialType = new CRM_Financial_DAO_FinancialType();
$financialType->id = $financialTypeId;
$financialType->find(TRUE);
// tables to ingore checks for financial_type_id
//delete from financial Type table
$financialType->delete();
- $entityFinancialType = new CRM_Financial_DAO_EntityFinancialAccount( );
+ $entityFinancialType = new CRM_Financial_DAO_EntityFinancialAccount();
$entityFinancialType->entity_id = $financialTypeId;
$entityFinancialType->entity_table = 'civicrm_financial_type';
$entityFinancialType->delete();
}
/**
- * To fetch financial type having relationship as Income Account is
+ * fetch financial type having relationship as Income Account is
*
*
- * @return array all financial type with income account is relationship
+ * @return array
+ * all financial type with income account is relationship
* @static
*/
public static function getIncomeFinancialType() {