11 class Inline implements \Magento\Framework\Translate\InlineInterface
115 if (!$this->scope instanceof \
Magento\Framework\
App\ScopeInterface) {
116 $scope = $this->scopeResolver->getScope($this->scope);
119 && $this->config->isDevAllowed(
$scope);
150 if (is_array($body)) {
151 foreach ($body as &$part) {
154 }
elseif (is_string($body)) {
155 $this->
getParser()->processResponseBodyString($body);
157 $body = $this->
getParser()->getContent();
188 if (stripos(
$content,
'</body>') ===
false) {
191 if (!$this->isScriptInserted) {
192 $this->
getParser()->setContent(str_ireplace(
'</body>', $this->getInlineScript() .
'</body>',
$content));
193 $this->isScriptInserted =
true;
205 protected function getInlineScript()
208 $block = $this->layout->createBlock(\
Magento\Framework\View\Element\Template::class);
211 $block->setTemplate($this->templateFileName);
223 return $this->url->getUrl(
224 $this->translatorRoute,
225 [
'_secure' => $this->scopeResolver->getScope()->isCurrentlySecure()]
237 if (is_array($body)) {
238 foreach ($body as &$part) {
242 if (is_string($body)) {
243 $body = preg_replace(
getAdditionalHtmlAttribute($tagName=null)
elseif(isset( $params[ 'redirect_parent']))
processResponseBody(&$body, $isJson=false)
__construct(\Magento\Framework\App\ScopeResolverInterface $scopeResolver, \Magento\Framework\UrlInterface $url, \Magento\Framework\View\LayoutInterface $layout, \Magento\Framework\Translate\Inline\ConfigInterface $config, \Magento\Framework\Translate\Inline\ParserInterface $parser, \Magento\Framework\Translate\Inline\StateInterface $state, $templateFileName='', $translatorRoute='', $scope=null)
stripInlineTranslations(&$body)