__('Add_type 1'), '2' => __('Add_type 2')]; } public function getTypeList() { return ['out' => __('Type out'), 'in' => __('Type in')]; } public function getAddressTypeList() { return ['1' => __('Address_type 1'), '2' => __('Address_type 2')]; } public function getAddTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['add_type']) ? $data['add_type'] : ''); $list = $this->getAddTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function getTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['type']) ? $data['type'] : ''); $list = $this->getTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function getAddressTypeTextAttr($value, $data) { $value = $value ? $value : (isset($data['address_type']) ? $data['address_type'] : ''); $list = $this->getAddressTypeList(); return isset($list[$value]) ? $list[$value] : ''; } public function classorder() { return $this->belongsTo(Order::class, 'classes_order_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function manystore() { return $this->belongsTo('app\admin\model\Manystore', 'manystore_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function shop() { return $this->belongsTo(ManystoreShop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function user() { return $this->belongsTo('app\common\model\User', 'user_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function teacher() { return $this->belongsTo('app\common\model\school\classes\Teacher', 'teacher_id', 'id', [], 'LEFT')->setEagerlyType(0); } }