Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. Contact.php
  2.  
  3. <?php
  4.  
  5. namespace VendorModuleBlock;
  6.  
  7. class Contact extends MagentoFrameworkViewElementTemplate
  8. {
  9. protected $_storeInfo;
  10.  
  11. public function __construct(
  12. MagentoStoreModelInformation $storeInfo
  13. )
  14. {
  15. $this->_storeInfo = $storeInfo;
  16. }
  17. public function getPhoneNumber()
  18. {
  19. return $this->_storeInfo->getInformationObject()->getPhone();
  20. }
  21.  
  22. }
  23.  
  24. <?php
  25. echo "Phone: ".$block->getPhoneNumber();
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement