* @return array
* associated array of decoded elements
*/
- static public function getDecodedData($jsonData) {
+ public static function getDecodedData($jsonData) {
return json_decode($jsonData, TRUE);
}
*
*/
class CRM_Badge_Page_AJAX {
+
public static function getImageProp() {
$img = $_GET['img'];
list($w, $h) = CRM_Badge_BAO_Badge::getImageProperties($img);
* @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Campaign_BAO_Petition extends CRM_Campaign_BAO_Survey {
+
/**
* Class constructor.
*/
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
- * @return CRM_Campaign_BAO_Petition
+ * @return mixed
+ * CRM_Campaign_BAO_Petition or NULl or void
*/
public function createSignature(&$params) {
if (empty($params)) {
return $statusTotal;
}
-
/**
* @param int $surveyId
*
*
* @var array
*/
- static $_campaignFields = NULL;
+ public static $_campaignFields = NULL;
- static $_applySurveyClause = FALSE;
+ public static $_applySurveyClause = FALSE;
/**
* Function get the fields for campaign.
* An array.
* @return $voterClause as a string
*/
+
/**
* @param array $params
*
* @return array
*/
- static public function voterClause($params) {
+ public static function voterClause($params) {
$voterClause = [];
$fromClause = $whereClause = NULL;
if (!is_array($params) || empty($params)) {
* @param string $returnColumn
* @param bool $includePetitionActivityType
*
- * @return string
+ * @return mixed
*/
public static function getSurveyActivityType($returnColumn = 'label', $includePetitionActivityType = FALSE) {
static $activityTypes;
return $defaults;
}
-
public function buildQuickForm() {
if ($this->_action & CRM_Core_Action::DELETE) {
return empty($errors) ? TRUE : $errors;
}
-
public function postProcess() {
// store the submitted values in an array
$params = $this->controller->exportValues($this->_name);
/**
* Prefix for the controller.
+ * @var string
*/
protected $_prefix = "survey_";
*/
protected $_surveyTitle;
-
/**
* Set variables up before form is built.
*/
*/
class CRM_Campaign_Form_Survey_Main extends CRM_Campaign_Form_Survey {
- /* values
+ /**
+ * values
*
* @var array
+ *
*/
+
public $_values;
/**
parent::buildQuickForm();
}
-
/**
* Process the form.
*/
protected $_reportTitle;
- /* values
+ /**
+ * values
*
* @var array
+ *
*/
+
public $_values;
const NUM_OPTION = 11;
/**
* Variable to store redirect path
+ * @var string
*/
private $_userContext;
class CRM_Campaign_Info extends CRM_Core_Component_Info {
/**
+ * @var string
* @inheritDoc
*/
protected $keyword = 'campaign';
];
}
-
/**
* @inheritDoc
* @param bool $getAllUnconditionally
return $permissions;
}
-
/**
* @inheritDoc
* @return null
* Page for displaying Petition Signatures.
*/
class CRM_Campaign_Page_Petition extends CRM_Core_Page {
+
public function browse() {
//get the survey id
* @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Campaign_Page_Petition_Confirm extends CRM_Core_Page {
+
/**
* @return string
* @throws Exception
* @copyright CiviCRM LLC (c) 2004-2019
*/
class CRM_Campaign_Page_Petition_ThankYou extends CRM_Core_Page {
+
/**
* Run page.
*
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* The option group name.
/**
* Engagement Level
+ * @var int
*/
private static $engagementLevel;
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
*/
- static $_columnHeaders;
+ public static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
*/
- static $_properties = [
+ public static $_properties = [
'contact_id',
'sort_name',
'street_unit',
*
* @return array
*/
- static public function &links() {
+ public static function &links() {
return self::$_links = [];
}
*/
class CRM_Campaign_Task extends CRM_Core_Task {
+ /**
+ * Campaign tasks
+ */
const
- // Campaign tasks
INTERVIEW = 601,
RESERVE = 602,
RELEASE = 603;
- static $objectType = 'campaign';
+ /**
+ * @var string
+ */
+ public static $objectType = 'campaign';
/**
* These tasks are the core set of tasks that the user can perform
*
* @var array
*/
- static $_exportableFields = NULL;
+ public static $_exportableFields = NULL;
/**
* Class constructor.
* @param int $userID
* @param string $condition
* @param string $limit
+ * @param string $order
*
* @return string
*/
*
* @var array
*/
- static $_exportableFields = NULL;
+ public static $_exportableFields = NULL;
/**
* Takes an associative array and creates a Case Type object.
}
}
-
/**
* Format / convert submitted array to xml for case type definition
*
* This class generates form components for LinkCase Activity.
*/
class CRM_Case_Form_Activity_LinkCases {
+
/**
* @param CRM_Core_Form $form
*
/**
* Case Id
+ * @var int
*/
public $_caseId = NULL;
/**
* Client Id
+ * @var int
*/
public $_currentlyViewedContactId = NULL;
/**
* Activity Type File
+ * @var int
*/
public $_activityTypeFile = NULL;
/**
* Logged in contact Id
+ * @var int
*/
public $_currentUserId = NULL;
/**
* Activity type Id
+ * @var int
*/
public $_activityTypeId = NULL;
/**
* Activity type Id
+ * @var int
*/
public $_activityId = NULL;
/**
* Action
+ * @var int
*/
public $_action;
/**
* Case type id
+ * @var int
*/
public $_caseTypeId = NULL;
$this->preventAjaxSubmit();
}
-
public function addRules() {
$this->addFormRule([get_class($this), 'formRule'], $this);
}
/**
* Case Id
+ * @var int
*/
public $_caseID = NULL;
/**
* Client Id
+ * @var int
*/
public $_clientID = NULL;
/**
* Activity set name
+ * @var string
*/
public $_activitySetName = NULL;
);
$this->addButtons([
- [
- 'type' => 'refresh',
- 'name' => ts('Generate Report'),
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'cancel',
- 'name' => ts('Cancel'),
- ],
- ]
- );
+ [
+ 'type' => 'refresh',
+ 'name' => ts('Generate Report'),
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'cancel',
+ 'name' => ts('Cancel'),
+ ],
+ ]);
// We want this form to redirect to a full page
$this->preventAjaxSubmit();
}
/**
* Prefix for the controller
+ * @var sting
*/
protected $_prefix = 'case_';
*
* @param array $fields
* Posted values of the form.
+ * @param array $files
+ * @param object $form
*
* @return array|bool
*/
*/
class CRM_Case_Form_Task extends CRM_Core_Form_Task {
- // Must be set to entity table name (eg. civicrm_participant) by child class
- static $tableName = 'civicrm_case';
- // Must be set to entity shortname (eg. event)
- static $entityShortname = 'case';
+ /**
+ * Must be set to entity table name (eg. civicrm_participant) by child class
+ * @var string
+ */
+ public static $tableName = 'civicrm_case';
+ /**
+ * Must be set to entity shortname (eg. event)
+ * @var string
+ */
+ public static $entityShortname = 'case';
/**
* @inheritDoc
*/
class CRM_Case_Form_Task_Batch extends CRM_Core_Form_Task_Batch {
- // Must be set to entity table name (eg. civicrm_participant) by child class
- static $tableName = 'civicrm_case';
- // Must be set to entity shortname (eg. event)
- static $entityShortname = 'case';
+ /**
+ * Must be set to entity table name (eg. civicrm_participant) by child class
+ * @var string
+ */
+ public static $tableName = 'civicrm_case';
+ /**
+ * Must be set to entity shortname (eg. event)
+ * @var string
+ */
+ public static $entityShortname = 'case';
/**
* Process the form after the input has been submitted and validated.
*
* @var string
*/
- static $tableName = 'civicrm_case';
+ public static $tableName = 'civicrm_case';
/**
* Must be set to entity shortname (eg. event)
*
* @var string
*/
- static $entityShortname = 'case';
+ public static $entityShortname = 'case';
}
// just need to add a javacript to popup the window for printing
//
$this->addButtons([
- [
- 'type' => 'next',
- 'name' => ts('Print Case List'),
- 'js' => ['onclick' => 'window.print()'],
- 'isDefault' => TRUE,
- ],
- [
- 'type' => 'back',
- 'name' => ts('Done'),
- ],
- ]
- );
+ [
+ 'type' => 'next',
+ 'name' => ts('Print Case List'),
+ 'js' => ['onclick' => 'window.print()'],
+ 'isDefault' => TRUE,
+ ],
+ [
+ 'type' => 'back',
+ 'name' => ts('Done'),
+ ],
+ ]);
}
/**
*/
public function buildQuickForm() {
$this->addButtons([
- [
- 'type' => 'done',
- 'name' => ts('Done'),
- 'isDefault' => TRUE,
- ],
- ]
- );
+ [
+ 'type' => 'done',
+ 'name' => ts('Done'),
+ 'isDefault' => TRUE,
+ ],
+ ]);
}
}
*/
public function buildQuickForm() {
$this->addButtons([
- [
- 'type' => 'done',
- 'name' => ts('Done'),
- 'isDefault' => TRUE,
- ],
- ]
- );
+ [
+ 'type' => 'done',
+ 'name' => ts('Done'),
+ 'isDefault' => TRUE,
+ ],
+ ]);
}
}
/**
+ * @var string
* @inheritDoc
*/
protected $keyword = 'case';
$case = civicrm_api3('Case', 'getsingle', [
'id' => $caseId,
'check_permissions' => TRUE,
- 'return' => ['subject', 'case_type_id', 'status_id', 'start_date', 'end_date']]
- );
+ 'return' => ['subject', 'case_type_id', 'status_id', 'start_date', 'end_date'],
+ ]);
$caseStatuses = CRM_Case_PseudoConstant::caseStatus();
$caseTypes = CRM_Case_PseudoConstant::caseType('title', FALSE);
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
public $_permission = NULL;
public $_contactId = NULL;
* @return array
* (reference) of action links
*/
- static public function &links() {
+ public static function &links() {
$config = CRM_Core_Config::singleton();
if (!(self::$_links)) {
* Activity type
* @var array
*/
- static $activityTypeList = [];
+ public static $activityTypeList = [];
/**
* Get all the case statues.
*
* @var array
*/
- static $_links = NULL;
+ public static $_links = NULL;
/**
* We use desc to remind us what that column is, name is used in the tpl
*
* @var array
*/
- static $_columnHeaders;
+ public static $_columnHeaders;
/**
* Properties of contact we're interested in displaying
* @var array
*/
- static $_properties = [
+ public static $_properties = [
'contact_id',
'contact_type',
'sort_name',
*
* @return array
*/
- static public function &links($isDeleted = FALSE, $key = NULL) {
+ public static function &links($isDeleted = FALSE, $key = NULL) {
$extraParams = ($key) ? "&key={$key}" : NULL;
if ($isDeleted) {
*/
class CRM_Case_Task extends CRM_Core_Task {
- const
- // Case tasks
- RESTORE_CASES = 501;
+ /**
+ * Case tasks
+ */
+ const RESTORE_CASES = 501;
- static $objectType = 'case';
+ /**
+ * @var string
+ */
+ public static $objectType = 'case';
/**
* These tasks are the core set of tasks that the user can perform
$defaultAssigneeOptions = civicrm_api3('OptionValue', 'get', [
'option_group_id' => 'activity_default_assignee',
- 'options' => [ 'limit' => 0 ]
+ 'options' => ['limit' => 0],
]);
foreach ($defaultAssigneeOptions['values'] as $option) {
protected function isBidirectionalRelationshipType($relationshipTypeId) {
$relationshipTypeResult = civicrm_api3('RelationshipType', 'get', [
'id' => $relationshipTypeId,
- 'options' => ['limit' => 1]
+ 'options' => ['limit' => 1],
]);
if ($relationshipTypeResult['count'] === 0) {
}
$contact = civicrm_api3('Contact', 'get', [
- 'id' => $activityTypeXML->default_assignee_contact
+ 'id' => $activityTypeXML->default_assignee_contact,
]);
if ($contact['count'] == 1) {
public function getRedactionRules() {
foreach (array(
- 'redactionStringRules',
- 'redactionRegexRules',
- ) as $key => $rule) {
+ 'redactionStringRules',
+ 'redactionRegexRules',
+ ) as $key => $rule) {
$$rule = CRM_Case_PseudoConstant::redactionRule($key);
if (!empty($$rule)) {