| Total Complexity | 5 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | class Quota extends WithLanguageSettingsModel |
||
| 20 | { |
||
| 21 | public static $settingsClass = QuotaText::class; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * {@inheritdoc} |
||
| 25 | */ |
||
| 26 | public static function tableName() |
||
| 27 | { |
||
| 28 | return "quota"; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * {@inheritdoc} |
||
| 33 | */ |
||
| 34 | public static function primaryKey() |
||
| 35 | { |
||
| 36 | return ["quota_id"]; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | */ |
||
| 42 | public function rules() |
||
| 43 | { |
||
| 44 | return array_merge(parent::rules(), [ |
||
| 45 | ]); |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return \yii\db\ActiveQuery |
||
| 50 | */ |
||
| 51 | public function getEndMessages() |
||
| 52 | { |
||
| 53 | $query = $this->getTexts(); |
||
| 54 | return $query->andWhere(['type_id' => QuotaText::TYPE_END_MESSAGE]); |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @return \yii\db\ActiveQuery |
||
| 59 | */ |
||
| 60 | public function getEndUrls() |
||
| 64 | } |
||
| 65 | |||
| 66 | |||
| 67 | } |