public function init() { $this->name = \skeeks\cms\shop\Module::t('app', 'Control of properties payer'); $this->modelShowAttribute = "name"; $this->modelClassName = ShopPersonTypeProperty::className(); parent::init(); }
/** * @inheritdoc */ public function behaviors() { return array_merge(parent::behaviors(), [HasRelatedProperties::className() => ['class' => HasRelatedProperties::className(), 'relatedElementPropertyClassName' => ShopBuyerProperty::className(), 'relatedPropertyClassName' => ShopPersonTypeProperty::className()]]); }
/** * @return \yii\db\ActiveQuery */ public function getShopPersonTypeProperties() { return $this->hasMany(ShopPersonTypeProperty::className(), ['shop_person_type_id' => 'id'])->orderBy(['priority' => SORT_ASC]); }
/** * @return \yii\db\ActiveQuery */ public function getProperty() { return $this->hasOne(ShopPersonTypeProperty::className(), ['id' => 'property_id']); }