View.php 955 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Paypal\Controller\Billing\Agreement;
  8. class View extends \Magento\Paypal\Controller\Billing\Agreement
  9. {
  10. /**
  11. * View billing agreement
  12. *
  13. * @return void
  14. */
  15. public function execute()
  16. {
  17. if (!($agreement = $this->_initAgreement())) {
  18. return;
  19. }
  20. $this->_view->loadLayout();
  21. $this->_view->getPage()->getConfig()->getTitle()->prepend(__('Billing Agreements'));
  22. $this->_view->getPage()->getConfig()->getTitle()->prepend(
  23. __('Billing Agreement # %1', $agreement->getReferenceId())
  24. );
  25. $navigationBlock = $this->_view->getLayout()->getBlock('customer_account_navigation');
  26. if ($navigationBlock) {
  27. $navigationBlock->setActive('paypal/billing_agreement/');
  28. }
  29. $this->_view->renderLayout();
  30. }
  31. }