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