Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
defaultlink.php
1<?php
3
4
5class DefaultLink extends LinkBase
6{
7 protected $isLangSetted = false;
8 protected $isFilterParamsSetted = false;
9
10 public function getType()
11 {
13 }
14
15 public function setLang($lang)
16 {
17 $this->isLangSetted = true;
18 if($lang !== false)
19 $this->query->set('lang', $lang);
20 return $this;
21 }
22
23 public function setFilterParams($query)
24 {
25 $this->isFilterParamsSetted = true;
26 if($query !== false)
27 $this->setQuery($query);
28 return $this;
29 }
30
31 public function fill()
32 {
33 //if($this->query->isChanged('lang') == false)
34 if($this->isLangSetted == false)
35 {
36 $this->query->set('lang', LANGUAGE_ID);
37 }
38
39 if($this->isFilterParamsSetted == false)
40 {
41 $this->setQuery(GetFilterParams("filter_", false));
42 }
43 return $this;
44 }
45}