BackendPage.php 731 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Mtf\Page;
  7. use Magento\Mtf\Factory\Factory;
  8. /**
  9. * Admin backend page.
  10. *
  11. * @SuppressWarnings(PHPMD.NumberOfChildren)
  12. */
  13. class BackendPage extends Page
  14. {
  15. /**
  16. * Init page. Set page url
  17. *
  18. * @return void
  19. */
  20. protected function initUrl()
  21. {
  22. $this->url = $_ENV['app_backend_url'] . static::MCA;
  23. }
  24. /**
  25. * Open backend page and log in if needed.
  26. *
  27. * @param array $params
  28. * @return $this
  29. */
  30. public function open(array $params = [])
  31. {
  32. Factory::getApp()->magentoBackendLoginUser();
  33. return parent::open($params);
  34. }
  35. }