Initial import

This commit is contained in:
Admin Nasledstvo
2026-05-01 20:52:04 +03:00
commit ac168868ee
10028 changed files with 2337954 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace app\models;
/**
* Class Pages
* @package app\models
* @property $name
* @property $name_en
* @property $text
* @property $text_en
* @property $slug
* @property $slug_en
* @property $id
* @property $media_key
* @property \app\models\Contacts $contact
* @property $price
* @property $months
*/
class Pages extends _Base
{
public static function getList($id = null)
{
$pages = [];
foreach (self::find()->all() as $page) {
if ($page->slug && $page->slug_en)
$pages[$page->id] = $page->name;
}
if ($id && !empty($pages[$id]))
return $pages[$id];
return $pages;
}
public function getContact() {
return $this->hasOne(Contacts::class, ['page_id' => 'id']);
}
}