AbstractBlock.php 799 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Backend\Block;
  7. /**
  8. * Base for all admin blocks.
  9. *
  10. * Avoid using this class. Will be deprecated
  11. *
  12. * Marked as public API because it is actively used now.
  13. * @api
  14. * @since 100.0.2
  15. */
  16. class AbstractBlock extends \Magento\Framework\View\Element\AbstractBlock
  17. {
  18. /**
  19. * @var \Magento\Framework\AuthorizationInterface
  20. */
  21. protected $_authorization;
  22. /**
  23. * @param \Magento\Backend\Block\Context $context
  24. * @param array $data
  25. */
  26. public function __construct(\Magento\Backend\Block\Context $context, array $data = [])
  27. {
  28. parent::__construct($context, $data);
  29. $this->_authorization = $context->getAuthorization();
  30. }
  31. }