Merge pull request #20150 from MegaphoneJon/backoffice-xfer
[civicrm-core.git] / CRM / Contribute / Controller / Task.php
1 <?php
2 /*
3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
5 | |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
10 */
11
12 /**
13 * Class CRM_Export_Controller_Standalone
14 */
15 class CRM_Contribute_Controller_Task extends CRM_Core_Controller_Task {
16
17 /**
18 * Get the name used to construct the class.
19 *
20 * @return string
21 */
22 public function getEntity():string {
23 return 'Contribution';
24 }
25
26 /**
27 * Get the available tasks for the entity.
28 *
29 * @return array
30 */
31 public function getAvailableTasks():array {
32 return CRM_Contribute_Task::tasks();
33 }
34
35 /**
36 * Override parent to avoid e-notice if the page is 'Search'.
37 *
38 * There are no form values for Search when the standalone processor is used
39 * - move along.
40 *
41 * @param string $pageName
42 *
43 * @return array
44 */
45 public function exportValues($pageName = NULL) {
46 if ($pageName === 'Search') {
47 return [];
48 }
49 return parent::exportValues($pageName);
50 }
51
52 }