Example #1
0
 /**
  * Checking whether the using static urls in WYSIWYG allowed event
  *
  * @param \Magento\Framework\Event\Observer $observer
  * @return void
  */
 public function catalogCheckIsUsingStaticUrlsAllowed(\Magento\Framework\Event\Observer $observer)
 {
     $storeId = $observer->getEvent()->getData('store_id');
     $result = $observer->getEvent()->getData('result');
     $result->isAllowed = $this->_catalogData->setStoreId($storeId)->isUsingStaticUrlsAllowed();
 }
Example #2
0
 /**
  * isUrlDirectivesParsingAllowed()
  * setStoreId()
  * @magentoConfigFixture current_store catalog/frontend/parse_url_directives 0
  */
 public function testIsUrlDirectivesParsingAllowed()
 {
     $this->assertFalse($this->helper->isUrlDirectivesParsingAllowed());
     $this->helper->setStoreId(\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Store\\Model\\StoreManagerInterface')->getStore()->getId());
     $this->assertFalse($this->helper->isUrlDirectivesParsingAllowed());
 }