public function onRegisterSeoHook (&$context)
	{
		$craft = \Craft::$app;
		$metaTemplateName = $this->getSettings()['metaTemplate'];

		if ($metaTemplateName)
			return $craft->view->renderTemplate(
				$metaTemplateName,
				$context
			);

		$oldTemplateMode = $craft->view->getTemplateMode();
		$craft->view->setTemplateMode(View::TEMPLATE_MODE_CP);
		$rendered = $craft->view->renderTemplate(
			'seo/_seo/meta',
			$context
		);
		$craft->view->setTemplateMode($oldTemplateMode);
		return $rendered;
	}
public function onRegisterSeoHook (&$context)
	{
		$craft = \Craft::$app;
		$metaTemplateName = $this->getSettings()['metaTemplate'];

		if ($metaTemplateName)
			return $craft->view->renderTemplate(
				$metaTemplateName,
				$context
			);

		$oldTemplateMode = $craft->view->getTemplateMode();
		$craft->view->setTemplateMode(View::TEMPLATE_MODE_CP);
		$rendered = $craft->view->renderTemplate(
			'seo/_seo/meta',
			$context
		);
		$craft->view->setTemplateMode($oldTemplateMode);
		return $rendered;
	}
public function onRegisterSeoHook ( & $ context ) { $ craft = \ Craft :: $ app ; $ metaTemplateName = $ this -> getSettings ( ) [ 'metaTemplate' ] ; if ( $ metaTemplateName ) return $ craft -> view -> renderTemplate ( $ metaTemplateName , $ context ) ; $ oldTemplateMode = $ craft -> view -> getTemplateMode ( ) ; $ craft -> view -> setTemplateMode ( View :: TEMPLATE_MODE_CP ) ; $ rendered = $ craft -> view -> renderTemplate ( 'seo/_seo/meta' , $ context ) ; $ craft -> view -> setTemplateMode ( $ oldTemplateMode ) ; return $ rendered ; }
@param $context

@return string
@throws \Twig_Error_Loader
@throws \yii\base\Exception
@param $context