Example #1
0
 /**
  * Emulate inline translation of the specified store
  *
  * Function disables inline translation if $storeId is null
  *
  * @param integer|null $storeId
  * @return boolean initial inline translation state
  */
 protected function _emulateInlineTranslation($storeId = null)
 {
     if (is_null($storeId)) {
         $newTranslateInline = false;
     } else {
         $newTranslateInline = $this->inlineConfig->isActive($storeId);
     }
     $translateInline = $this->inlineTranslation->isEnabled();
     $this->inlineTranslation->suspend($newTranslateInline);
     return $translateInline;
 }
Example #2
0
 /**
  * Stores current environment info
  *
  * @return void
  */
 public function storeCurrentEnvironmentInfo()
 {
     $this->initialEnvironmentInfo = new \Magento\Framework\DataObject();
     $this->initialEnvironmentInfo->setInitialTranslateInline($this->inlineTranslation->isEnabled())->setInitialDesign(['area' => $this->_viewDesign->getArea(), 'theme' => $this->_viewDesign->getDesignTheme(), 'store' => $this->_storeManager->getStore()->getStoreId()])->setInitialLocaleCode($this->_localeResolver->getLocale());
 }