array( 'name' => ts('View'), 'url' => 'civicrm/contact/view/contribution', 'qs' => 'reset=1&id=%%contid%%&cid=%%cid%%&action=view&context=contribution&selectedChild=contribute', 'title' => ts('View Contribution'), ), 'remove' => array( 'name' => ts('Remove'), 'title' => ts('Remove Transaction'), 'extra' => 'onclick = "assignRemove( %%id%%,\'' . 'remove' . '\' );"', ), ); } return self::$_links; } /** * Run the page. * * This method is called after the page is created. It checks for the * type of action and executes that action. * Finally it calls the parent's run method. * * @return void */ public function run() { // get the requested action $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse'); // default to 'browse' // assign vars to templates $this->assign('action', $action); self::$_entityID = CRM_Utils_Request::retrieve('bid', 'Positive'); if (isset(self::$_entityID)) { $statusID = CRM_Core_DAO::getFieldValue('CRM_Batch_BAO_Batch', self::$_entityID, 'status_id'); } $breadCrumb = array( array( 'title' => ts('Accounting Batches'), 'url' => CRM_Utils_System::url('civicrm/financial/financialbatches', "reset=1&batchStatus=$statusID"), ), ); CRM_Utils_System::appendBreadCrumb($breadCrumb); $this->edit($action, self::$_entityID); return parent::run(); } /** * Browse all financial batch transactions. * * * @return void */ public function browse() { } /** * Get name of edit form. * * @return string * Classname of edit form. */ public function editForm() { return 'CRM_Financial_Form_BatchTransaction'; } /** * Get edit form name. * * @return string * name of this page. */ public function editName() { return 'Batch'; } /** * Get user context. * * @param null $mode * * @return string * user context. */ public function userContext($mode = NULL) { return 'civicrm/batchtransaction'; } }