/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); if ($this->getModule() && 'CDev\\Bestsellers' == $this->getModule()->getActualName()) { $result['sales_calculation'] = new \XLite\View\Button\Link(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Sales calculation', \XLite\View\Button\Link::PARAM_LOCATION => $this->buildURL('sales_calculation', 'sales', array(\XLite::FORM_ID => \XLite::getFormId())), \XLite\View\Button\AButton::PARAM_STYLE => 'action always-enabled')); } return $result; }
/** * Return list of the "Button" widgets * * @return array */ protected function getFormButtons() { $result = parent::getFormButtons(); $result['addons-list'] = new \XLite\View\Button\BackToModulesLink(array(\XLite\View\Button\BackToModulesLink::PARAM_MODULE_ID => $this->getModuleID(), \XLite\View\Button\AButton::PARAM_STYLE => 'action addons-list-back-button')); $page = \XLite\Core\Request::getInstance()->page; if (\XLite\Module\CDev\XPaymentsConnector\Core\Settings::PAGE_CONNECTION == $page) { $result['submit'] = new \XLite\View\Button\Submit(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Submit and test module', \XLite\View\Button\AButton::PARAM_BTN_TYPE => 'regular-main-button', \XLite\View\Button\AButton::PARAM_STYLE => 'action')); } elseif (\XLite\Module\CDev\XPaymentsConnector\Core\Settings::PAGE_PAYMENT_METHODS == $page) { $result = array(); } return $result; }