+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2018 |
+ | Copyright CiviCRM LLC (c) 2004-2019 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2018
+ * @copyright CiviCRM LLC (c) 2004-2019
* $Id$
*
*/
/**
- * This class generates task actions for CiviEvent
- *
+ * Class for grant form task actions.
+ * FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
*/
-class CRM_Grant_Form_Task extends CRM_Core_Form {
-
- /**
- * The task being performed.
- *
- * @var int
- */
- protected $_task;
-
- /**
- * The additional clause that we restrict the search with.
- *
- * @var string
- */
- protected $_componentClause = NULL;
-
- /**
- * The array that holds all the component ids.
- *
- * @var array
- */
- protected $_componentIds;
+class CRM_Grant_Form_Task extends CRM_Core_Form_Task {
/**
* The array that holds all the grant ids.
/**
* @param CRM_Core_Form $form
- * @param bool $useTable
*/
- public static function preProcessCommon(&$form, $useTable = FALSE) {
+ public static function preProcessCommon(&$form) {
$form->_grantIds = array();
$values = $form->controller->exportValues('Search');
$form->_grantIds = $form->_componentIds = $ids;
//set the context for redirection for any task actions
- $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $this);
+ $qfKey = CRM_Utils_Request::retrieve('qfKey', 'String', $form);
$urlParams = 'force=1';
if (CRM_Utils_Rule::qfKey($qfKey)) {
$urlParams .= "&qfKey=$qfKey";
* since its used for things like send email
*/
public function setContactIDs() {
- $this->_contactIds = &CRM_Core_DAO::getContactIDsFromComponent($this->_grantIds,
+ $this->_contactIds = CRM_Core_DAO::getContactIDsFromComponent($this->_grantIds,
'civicrm_grant'
);
}