CRM-16188, removed white spaces
[civicrm-core.git] / CRM / Financial / Page / Batch.php
CommitLineData
6a488035
TO
1<?php
2/*
3 +--------------------------------------------------------------------+
7e9e8871 4 | CiviCRM version 4.7 |
6a488035 5 +--------------------------------------------------------------------+
e7112fa7 6 | Copyright CiviCRM LLC (c) 2004-2015 |
6a488035
TO
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
9 | |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
18 | |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
26 */
27
28/**
29 *
30 * @package CRM
e7112fa7 31 * @copyright CiviCRM LLC (c) 2004-2015
6a488035
TO
32 */
33
34/**
35 * Page for displaying list of current batches
36 */
37class CRM_Financial_Page_Batch extends CRM_Core_Page_Basic {
38
39 /**
40 * The action links that we need to display for the browse screen
41 *
42 * @var array
6a488035
TO
43 */
44 static $_links = NULL;
45
46 /**
fe482240 47 * Get BAO Name.
6a488035 48 *
a6c01b45
CW
49 * @return string
50 * Classname of BAO.
6a488035 51 */
00be9182 52 public function getBAOName() {
6a488035
TO
53 return 'CRM_Batch_BAO_Batch';
54 }
55
3d11174a 56 public function &links() {
57 }
58
6a488035 59 /**
fe482240 60 * Get name of edit form.
6a488035 61 *
a6c01b45
CW
62 * @return string
63 * Classname of edit form.
6a488035 64 */
00be9182 65 public function editForm() {
6a488035
TO
66 return 'CRM_Financial_Form_FinancialBatch';
67 }
68
69 /**
fe482240 70 * Get edit form name.
6a488035 71 *
a6c01b45
CW
72 * @return string
73 * name of this page.
6a488035 74 */
00be9182 75 public function editName() {
6a488035
TO
76 return ts('Accounting Batch Processing');
77 }
78
79 /**
80 * Get user context.
81 *
6c8f6e67
EM
82 * @param null $mode
83 *
a6c01b45
CW
84 * @return string
85 * user context.
6a488035 86 */
00be9182 87 public function userContext($mode = NULL) {
6a488035
TO
88 return CRM_Utils_System::currentPath();
89 }
90
91 /**
100fef9d 92 * Browse all entities.
6a488035 93 */
00be9182 94 public function browse() {
6a488035
TO
95 $status = CRM_Utils_Request::retrieve('status', 'Positive', CRM_Core_DAO::$_nullObject, FALSE, 1);
96 $this->assign('status', $status);
97 $this->search();
98 }
99
00be9182 100 public function search() {
045f52a3 101 if ($this->_action & (CRM_Core_Action::ADD |
6a488035
TO
102 CRM_Core_Action::UPDATE |
103 CRM_Core_Action::DELETE
104 )
105 ) {
106 return;
107 }
108
109 $form = new CRM_Core_Controller_Simple('CRM_Financial_Form_Search', ts('Search Batches'), CRM_Core_Action::ADD);
110 $form->setEmbedded(TRUE);
111 $form->setParent($this);
112 $form->process();
113 $form->run();
114 }
96025800 115
6a488035 116}