X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FGrant%2FForm%2FTask.php;h=26ce02f77bd826eda7b0a50491b05839882b1f80;hb=3bbe587eca52e262562cd1b06484eefa30480a08;hp=51f505428ee2b13183ec9f0171556f32b5fadb2b;hpb=0e4e45435dc33f16b49a4093ac25158728251213;p=civicrm-core.git diff --git a/CRM/Grant/Form/Task.php b/CRM/Grant/Form/Task.php index 51f505428e..26ce02f77b 100644 --- a/CRM/Grant/Form/Task.php +++ b/CRM/Grant/Form/Task.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2018 | + | Copyright CiviCRM LLC (c) 2004-2019 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,37 +28,16 @@ /** * * @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. @@ -80,9 +59,8 @@ class CRM_Grant_Form_Task extends CRM_Core_Form { /** * @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'); @@ -127,7 +105,7 @@ class CRM_Grant_Form_Task extends CRM_Core_Form { $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"; @@ -142,7 +120,7 @@ class CRM_Grant_Form_Task extends CRM_Core_Form { * 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' ); }