<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
*
* @return array
*/
- public function &actionLinks() {
+ public static function &actionLinks() {
if (!isset(self::$_actionLinks)) {
self::$_actionLinks = array(
CRM_Core_Action::UPDATE => array(
$isGroupReserved = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', $this->_gid, 'is_reserved');
$this->assign('isGroupReserved', $isGroupReserved);
- $profileType = CRM_Core_BAO_UFField::getProfileType($this->_gid);
- if ($profileType == 'Contribution' || $profileType == 'Membership' || $profileType == 'Activity' || $profileType == 'Participant') {
+ $isMixedProfile = CRM_Core_BAO_UFField::checkProfileType($this->_gid);
+ if ($isMixedProfile) {
$this->assign('skipCreate', TRUE);
}
$ufField[$ufFieldBAO->id]['label'] = $ufFieldBAO->label;
- $action = array_sum(array_keys($this->actionLinks()));
+ $action = array_sum(array_keys(self::actionLinks()));
if ($ufFieldBAO->is_active) {
$action -= CRM_Core_Action::ENABLE;
}