3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
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 +--------------------------------------------------------------------+
15 * @copyright CiviCRM LLC https://civicrm.org/licensing
19 * Page for displaying list of financial types
21 class CRM_Financial_Page_FinancialBatch
extends CRM_Core_Page_Basic
{
24 * The action links that we need to display for the browse screen.
28 public static $_links = NULL;
36 public function getBAOName() {
37 return 'CRM_Batch_BAO_Batch';
44 * (reference) of action links
46 public function &links() {
47 if (!(self
::$_links)) {
56 * This method is called after the page is created. It checks for the
57 * type of action and executes that action.
58 * Finally it calls the parent's run method.
60 public function run() {
61 $context = CRM_Utils_Request
::retrieve('context', 'Alphanumeric', $this);
62 $this->set("context", $context);
64 $id = $this->getIdAndAction();
66 // what action to take ?
67 if ($this->_action
& (CRM_Core_Action
::UPDATE |
68 CRM_Core_Action
::ADD |
69 CRM_Core_Action
::CLOSE |
70 CRM_Core_Action
::REOPEN |
71 CRM_Core_Action
::EXPORT
)
73 $this->edit($this->_action
, $id);
76 return CRM_Core_Page
::run();
80 * Get name of edit form.
83 * classname of edit form.
85 public function editForm() {
86 return 'CRM_Financial_Form_FinancialBatch';
95 public function editName() {
96 return 'Accounting Batch';
102 * Redirect to civicrm home page when clicked on cancel button
109 public function userContext($mode = NULL) {
110 $context = $this->get("context");
111 if ($mode == CRM_Core_Action
::UPDATE ||
($mode = CRM_Core_Action
::ADD
& isset($context))) {
112 return "civicrm/financial/financialbatches";
122 public function userContextParams($mode = NULL) {
123 $context = $this->get("context");
124 if ($mode == CRM_Core_Action
::UPDATE ||
($mode = CRM_Core_Action
::ADD
& isset($context))) {
125 return "reset=1&batchStatus={$context}";