Commit 9e39764a392a2da3d2b7867620713960e6dc568b

Authored by Administrator
1 parent 4656e4ee

add variantSku

Showing 1 changed file with 36 additions and 4 deletions   Show diff stats
widgets/Seo.php
... ... @@ -46,7 +46,9 @@ class Seo extends Widget
46 46  
47 47 }
48 48  
49   -
  49 + /**
  50 + * @return mixed
  51 + */
50 52 public function run()
51 53 {
52 54  
... ... @@ -230,6 +232,10 @@ class Seo extends Widget
230 232  
231 233 }
232 234  
  235 + /**
  236 + * @param $str
  237 + * @return mixed
  238 + */
233 239 protected function replaceData($str)
234 240 {
235 241  
... ... @@ -242,6 +248,10 @@ class Seo extends Widget
242 248 return $str;
243 249 }
244 250  
  251 + /**
  252 + * @param $url
  253 + * @return static
  254 + */
245 255 protected static function findSeoByUrl($url)
246 256 {
247 257 if(empty(self::$check_url_bool)){
... ... @@ -251,6 +261,9 @@ class Seo extends Widget
251 261 return self::$check_url;
252 262 }
253 263  
  264 + /**
  265 + * @return array|null|\yii\db\ActiveRecord
  266 + */
254 267 protected function findSeoByDynamic()
255 268 {
256 269  
... ... @@ -266,12 +279,16 @@ class Seo extends Widget
266 279 return $query->one();
267 280 }
268 281  
269   -
  282 + /**
  283 + * @return array|null|\yii\db\ActiveRecord
  284 + */
270 285 protected function findSeoByDynamicForFilters(){
271 286 return SeoDynamic::find()->joinWith('seoCategory')->where(['param' =>'filters'])->one();
272 287 }
273 288  
274   -
  289 + /**
  290 + * @return array
  291 + */
275 292 protected function getViewData()
276 293 {
277 294 $params = $this->getView()->params;
... ... @@ -315,6 +332,11 @@ class Seo extends Widget
315 332  
316 333 }
317 334  
  335 + /**
  336 + * @param $array
  337 + * @param $title
  338 + * @return mixed
  339 + */
318 340 public function getTitleString($array, $title){
319 341  
320 342 $row = '';
... ... @@ -328,7 +350,11 @@ class Seo extends Widget
328 350  
329 351 }
330 352  
331   -
  353 + /**
  354 + * @param $array
  355 + * @param $description
  356 + * @return mixed
  357 + */
332 358 public function getDescriptionString($array, $description){
333 359  
334 360 $row = '';
... ... @@ -343,6 +369,11 @@ class Seo extends Widget
343 369 }
344 370  
345 371  
  372 + /**
  373 + * @param $array
  374 + * @param $h1
  375 + * @return mixed
  376 + */
346 377 public function getNameString($array, $h1){
347 378  
348 379 $row = ' ';
... ... @@ -420,6 +451,7 @@ class Seo extends Widget
420 451  
421 452 /**
422 453 * @param $string
  454 + * @return mixed
423 455 */
424 456 public function prepareString($string){
425 457 return preg_replace('/\{.[^\}]*\}/','',$string);
... ...