* The action links that we need to display for the browse screen
*
* @var array
- * @static
*/
static $_links = NULL;
/**
* Get BAO Name
*
- * @return string Classname of BAO.
+ * @return string
+ * Classname of BAO.
*/
public function getBAOName() {
return 'CRM_Contribute_BAO_ManagePremiums';
/**
* Get action Links
*
- * @return array (reference) of action links
+ * @return array
+ * (reference) of action links
*/
public function &links() {
if (!(self::$_links)) {
* Finally it calls the parent's run method.
*
* @return void
- *
*/
public function run() {
*
*
* @return void
- * @static
*/
public function browse() {
// get all custom groups sorted by weight
// form all action links
$action = array_sum(array_keys($this->links()));
-
if ($dao->is_active) {
$action -= CRM_Core_Action::ENABLE;
}
'Premium',
$dao->id
);
- //Financial Type
- if( !empty( $dao->financial_type_id ) ){
- require_once 'CRM/Core/DAO.php';
- $premiums[$dao->id]['financial_type_id'] = CRM_Core_DAO::getFieldValue( 'CRM_Financial_DAO_FinancialType', $dao->financial_type_id, 'name' );
+ //Financial Type
+ if (!empty($dao->financial_type_id)) {
+ require_once 'CRM/Core/DAO.php';
+ $premiums[$dao->id]['financial_type_id'] = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_FinancialType', $dao->financial_type_id, 'name');
+ }
}
- }
$this->assign('rows', $premiums);
}
/**
* Get name of edit form
*
- * @return string Classname of edit form.
+ * @return string
+ * Classname of edit form.
*/
public function editForm() {
return 'CRM_Contribute_Form_ManagePremiums';
/**
* Get edit form name
*
- * @return string name of this page.
+ * @return string
+ * name of this page.
*/
public function editName() {
return 'Manage Premiums';
*
* @param null $mode
*
- * @return string user context.
+ * @return string
+ * user context.
*/
public function userContext($mode = NULL) {
return 'civicrm/admin/contribute/managePremiums';