@@ 9-29 (lines=21) @@ | ||
6 | * @license http://argilla.ru/LICENSE |
|
7 | * @package frontend.models.seo |
|
8 | */ |
|
9 | class Counter extends FActiveRecord |
|
10 | { |
|
11 | public function tableName() |
|
12 | { |
|
13 | return '{{seo_counters}}'; |
|
14 | } |
|
15 | ||
16 | public function defaultScope() |
|
17 | { |
|
18 | $alias = $this->getTableAlias(false, false); |
|
19 | ||
20 | return array( |
|
21 | 'condition' => $alias.'.visible=1', |
|
22 | ); |
|
23 | } |
|
24 | ||
25 | public function __toString() |
|
26 | { |
|
27 | return $this->code; |
|
28 | } |
|
29 | } |
@@ 17-32 (lines=16) @@ | ||
14 | * @property string $changefreq |
|
15 | * @property float $priority |
|
16 | */ |
|
17 | class SitemapRoute extends FActiveRecord |
|
18 | { |
|
19 | public function tableName() |
|
20 | { |
|
21 | return '{{seo_sitemap_route}}'; |
|
22 | } |
|
23 | ||
24 | public function defaultScope() |
|
25 | { |
|
26 | $alias = $this->getTableAlias(true, false); |
|
27 | ||
28 | return array( |
|
29 | 'condition' => "{$alias}.visible = 1", |
|
30 | ); |
|
31 | } |
|
32 | } |