d8c1a2e0
Yarik
Big commit artbox
|
1
|
<?php
|
36d1807a
Yarik
Big commit.
|
2
3
|
namespace common\models;
|
824ca43a
Alexey Boroda
-Pages update (ad...
|
4
|
|
d55d2fe0
Yarik
Multilanguage
|
5
6
7
8
|
use common\modules\language\behaviors\LanguageBehavior;
use yii\db\ActiveQuery;
use yii\db\ActiveRecord;
use yii\web\Request;
|
824ca43a
Alexey Boroda
-Pages update (ad...
|
9
|
|
d8c1a2e0
Yarik
Big commit artbox
|
10
|
/**
|
36d1807a
Yarik
Big commit.
|
11
|
* This is the model class for table "page".
|
824ca43a
Alexey Boroda
-Pages update (ad...
|
12
13
|
* @property integer $id
* @property bool $in_menu
|
d55d2fe0
Yarik
Multilanguage
|
14
|
* * From language behavior *
|
824ca43a
Alexey Boroda
-Pages update (ad...
|
15
16
17
18
19
|
* @property PageLang $lang
* @property PageLang[] $langs
* @property PageLang $object_lang
* @property string $ownerKey
* @property string $langKey
|
72a992f5
Yarik
Import browser v1.0
|
20
21
|
* @property PageLang[] $model_langs
* @property bool $transactionStatus
|
d55d2fe0
Yarik
Multilanguage
|
22
|
* @method string getOwnerKey()
|
824ca43a
Alexey Boroda
-Pages update (ad...
|
23
|
* @method void setOwnerKey( string $value )
|
d55d2fe0
Yarik
Multilanguage
|
24
|
* @method string getLangKey()
|
824ca43a
Alexey Boroda
-Pages update (ad...
|
25
|
* @method void setLangKey( string $value )
|
d55d2fe0
Yarik
Multilanguage
|
26
27
28
|
* @method ActiveQuery getLangs()
* @method ActiveQuery getLang( integer $language_id )
* @method PageLang[] generateLangs()
|
72a992f5
Yarik
Import browser v1.0
|
29
30
31
32
|
* @method void loadLangs( Request $request )
* @method bool linkLangs()
* @method bool saveLangs()
* @method bool getTransactionStatus()
|
d55d2fe0
Yarik
Multilanguage
|
33
|
* * End language behavior *
|
d8c1a2e0
Yarik
Big commit artbox
|
34
|
*/
|
824ca43a
Alexey Boroda
-Pages update (ad...
|
35
|
class Page extends ActiveRecord
|
d8c1a2e0
Yarik
Big commit artbox
|
36
|
{
|
36d1807a
Yarik
Big commit.
|
37
|
|
824ca43a
Alexey Boroda
-Pages update (ad...
|
38
39
|
public $title;
|
36d1807a
Yarik
Big commit.
|
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/**
* @inheritdoc
*/
public static function tableName()
{
return 'page';
}
/**
* @inheritdoc
*/
public function behaviors()
{
return [
|
d55d2fe0
Yarik
Multilanguage
|
54
55
56
|
'language' => [
'class' => LanguageBehavior::className(),
],
|
36d1807a
Yarik
Big commit.
|
57
58
59
60
61
62
63
64
65
66
|
];
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[
|
824ca43a
Alexey Boroda
-Pages update (ad...
|
67
68
69
70
|
[ 'title' ],
'safe',
],
[
|
36d1807a
Yarik
Big commit.
|
71
|
[
|
36d1807a
Yarik
Big commit.
|
72
73
74
75
76
77
78
|
'in_menu',
],
'boolean',
],
];
}
|
36d1807a
Yarik
Big commit.
|
79
80
81
82
83
84
|
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
|
824ca43a
Alexey Boroda
-Pages update (ad...
|
85
86
|
'id' => 'ID',
'in_menu' => 'Show in menu',
|
36d1807a
Yarik
Big commit.
|
87
88
|
];
}
|
d8c1a2e0
Yarik
Big commit artbox
|
89
|
}
|