Advertisement
Guest User

Untitled

a guest
Apr 30th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. Object DOMDocument should be created.
  2.  
  3. namespace TechnoAreaBlockArea;
  4.  
  5. use TechnoAreaBlockBaseBlock;
  6. use TechnoAreaModelArea as AreaModel;
  7. use TechnoAreaModelStatus;
  8.  
  9. class Index extends BaseBlock {
  10.  
  11. protected $_areaFactory;
  12. protected $_area;
  13. protected $_areaCollectionFactory;
  14. protected $_areaHelper;
  15.  
  16. public function __construct(
  17. MagentoFrameworkViewElementTemplateContext $context
  18. TechnoAreaModelResourceModelAreaCollectionFactory $areaCollectionFactory,
  19. TechnoAreaModelAreaFactory $areaFactory,
  20. AreaModel $area,
  21. TechnoAreaHelperData $areaHelper
  22. ) {
  23. parent::__construct($context);
  24. $this->_areaFactory = $areaFactory;
  25. $this->_area = $area;
  26. $this->_areaCollectionFactory = $areaCollectionFactory;
  27. $this->_areaHelper = $areaHelper;
  28. }
  29.  
  30.  
  31. public function getAreaCollection() {
  32. $areaCollection = $this->_areaCollectionFactory->create()
  33. ->addFieldToFilter('status', Status::STATUS_ENABLED)
  34. ->setOrder('area_name', 'ASC');
  35.  
  36. return $areaCollection;
  37. }
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement