common/utilities/ContentUtil.php
public static function initModel( $view, $config = [] ) {

		$model = isset( $view->params[ 'model' ] ) ? $view->params[ 'model' ] : self::findModel( $config );

		if( isset( $model ) ) {

			$coreProperties = CoreProperties::getInstance();
			$seoData		= $model->getDataMeta( CoreGlobal::DATA_SEO );

			// Model
			$view->params[ 'model' ]	= $model;
			$view->params[ 'seo' ]		= $seoData;

			// SEO H1 - Page Summary
			$view->params[ 'summary' ]	= isset( $seoData ) && !empty( $seoData->summary ) ? $seoData->summary : ( isset( $model->summary ) && !empty( $model->summary ) ? $model->summary : $model->description );

			// SEO Meta Tags - Description, Keywords, Robot Text
			$view->params[ 'desc' ]		= isset( $seoData ) && !empty( $seoData->description ) ? $seoData->description : $model->description;
			$view->params[ 'keywords' ]	= isset( $seoData ) && !empty( $seoData->keywords ) ? $seoData->keywords : null;
			$view->params[ 'robot' ]	= isset( $seoData ) && !empty( $seoData->robot ) ? $seoData->robot : null;

			// SEO - Page Title
			$siteTitle		= $coreProperties->getSiteTitle();
			$seoName		= isset( $seoData ) && !empty( $seoData->name ) ? $seoData->name : $model->name;

			$view->title = "$seoName | $siteTitle";
		}
	}
public static function initModel( $view, $config = [] ) {

		$model = isset( $view->params[ 'model' ] ) ? $view->params[ 'model' ] : self::findModel( $config );

		if( isset( $model ) ) {

			$coreProperties = CoreProperties::getInstance();
			$seoData		= $model->getDataMeta( CoreGlobal::DATA_SEO );

			// Model
			$view->params[ 'model' ]	= $model;
			$view->params[ 'seo' ]		= $seoData;

			// SEO H1 - Page Summary
			$view->params[ 'summary' ]	= isset( $seoData ) && !empty( $seoData->summary ) ? $seoData->summary : ( isset( $model->summary ) && !empty( $model->summary ) ? $model->summary : $model->description );

			// SEO Meta Tags - Description, Keywords, Robot Text
			$view->params[ 'desc' ]		= isset( $seoData ) && !empty( $seoData->description ) ? $seoData->description : $model->description;
			$view->params[ 'keywords' ]	= isset( $seoData ) && !empty( $seoData->keywords ) ? $seoData->keywords : null;
			$view->params[ 'robot' ]	= isset( $seoData ) && !empty( $seoData->robot ) ? $seoData->robot : null;

			// SEO - Page Title
			$siteTitle		= $coreProperties->getSiteTitle();
			$seoName		= isset( $seoData ) && !empty( $seoData->name ) ? $seoData->name : $model->name;

			$view->title = "$seoName | $siteTitle";
		}
	}
public static function initModel ( $ view , $ config = [ ] ) { $ model = isset ( $ view -> params [ 'model' ] ) ? $ view -> params [ 'model' ] : self :: findModel ( $ config ) ; if ( isset ( $ model ) ) { $ coreProperties = CoreProperties :: getInstance ( ) ; $ seoData = $ model -> getDataMeta ( CoreGlobal :: DATA_SEO ) ; // Model $ view -> params [ 'model' ] = $ model ; $ view -> params [ 'seo' ] = $ seoData ; // SEO H1 - Page Summary $ view -> params [ 'summary' ] = isset ( $ seoData ) && ! empty ( $ seoData -> summary ) ? $ seoData -> summary : ( isset ( $ model -> summary ) && ! empty ( $ model -> summary ) ? $ model -> summary : $ model -> description ) ; // SEO Meta Tags - Description, Keywords, Robot Text $ view -> params [ 'desc' ] = isset ( $ seoData ) && ! empty ( $ seoData -> description ) ? $ seoData -> description : $ model -> description ; $ view -> params [ 'keywords' ] = isset ( $ seoData ) && ! empty ( $ seoData -> keywords ) ? $ seoData -> keywords : null ; $ view -> params [ 'robot' ] = isset ( $ seoData ) && ! empty ( $ seoData -> robot ) ? $ seoData -> robot : null ; // SEO - Page Title $ siteTitle = $ coreProperties -> getSiteTitle ( ) ; $ seoName = isset ( $ seoData ) && ! empty ( $ seoData -> name ) ? $ seoData -> name : $ model -> name ; $ view -> title = "$seoName | $siteTitle" ; } }
Generates the meta data of Model using SEO Data.

@param \yii\web\View $view The current view being rendered by controller.
@param array $config
@return array having model meta data.
Generates the meta data of Model using SEO Data .