Commit 61453ef0c0e2e2e94758b38dfe265b6eef9ffbc3

Authored by Yarik
1 parent f4e641d8

Order frontend continue

Showing 2 changed files with 8 additions and 2 deletions   Show diff stats
models/Delivery.php
... ... @@ -15,6 +15,7 @@
15 15 * @property int $value
16 16 * @property int $sort
17 17 * @property Delivery|null $parent
  18 + * @property Delivery[] $children
18 19 * * From language behavior *
19 20 * @property OrderDeliveryLang $lang
20 21 * @property OrderDeliveryLang[] $langs
... ... @@ -77,4 +78,10 @@
77 78 {
78 79 return $this->hasOne(self::className(), [ 'id' => 'parent_id' ]);
79 80 }
80   - }
81 81 \ No newline at end of file
  82 +
  83 + public function getChildren()
  84 + {
  85 + return $this->hasMany(self::className(), [ 'parent_id' => 'id' ]);
  86 + }
  87 + }
  88 +
82 89 \ No newline at end of file
... ...
models/OrderDeliveryLang.php
... ... @@ -47,7 +47,6 @@
47 47 [
48 48 [
49 49 'title',
50   - 'text',
51 50 ],
52 51 'required',
53 52 ],
... ...