From 9e39764a392a2da3d2b7867620713960e6dc568b Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Wed, 30 Nov 2016 18:19:14 +0200 Subject: [PATCH] add variantSku --- widgets/Seo.php | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/widgets/Seo.php b/widgets/Seo.php index da32b01..2cf707d 100755 --- a/widgets/Seo.php +++ b/widgets/Seo.php @@ -46,7 +46,9 @@ class Seo extends Widget } - + /** + * @return mixed + */ public function run() { @@ -230,6 +232,10 @@ class Seo extends Widget } + /** + * @param $str + * @return mixed + */ protected function replaceData($str) { @@ -242,6 +248,10 @@ class Seo extends Widget return $str; } + /** + * @param $url + * @return static + */ protected static function findSeoByUrl($url) { if(empty(self::$check_url_bool)){ @@ -251,6 +261,9 @@ class Seo extends Widget return self::$check_url; } + /** + * @return array|null|\yii\db\ActiveRecord + */ protected function findSeoByDynamic() { @@ -266,12 +279,16 @@ class Seo extends Widget return $query->one(); } - + /** + * @return array|null|\yii\db\ActiveRecord + */ protected function findSeoByDynamicForFilters(){ return SeoDynamic::find()->joinWith('seoCategory')->where(['param' =>'filters'])->one(); } - + /** + * @return array + */ protected function getViewData() { $params = $this->getView()->params; @@ -315,6 +332,11 @@ class Seo extends Widget } + /** + * @param $array + * @param $title + * @return mixed + */ public function getTitleString($array, $title){ $row = ''; @@ -328,7 +350,11 @@ class Seo extends Widget } - + /** + * @param $array + * @param $description + * @return mixed + */ public function getDescriptionString($array, $description){ $row = ''; @@ -343,6 +369,11 @@ class Seo extends Widget } + /** + * @param $array + * @param $h1 + * @return mixed + */ public function getNameString($array, $h1){ $row = ' '; @@ -420,6 +451,7 @@ class Seo extends Widget /** * @param $string + * @return mixed */ public function prepareString($string){ return preg_replace('/\{.[^\}]*\}/','',$string); -- libgit2 0.21.4