public function init()
 {
     $this->name = \Yii::t('skeeks/shop/app', 'Affiliates');
     $this->modelShowAttribute = "id";
     $this->modelClassName = ShopAffiliate::className();
     parent::init();
 }
 public function init()
 {
     $this->name = \skeeks\cms\shop\Module::t('app', 'Affiliates');
     $this->modelShowAttribute = "id";
     $this->modelClassName = ShopAffiliate::className();
     parent::init();
 }
Example #3
0
?>

<?php 
echo $form->fieldSet(\skeeks\cms\shop\Module::t('app', 'Main'));
?>

    <?php 
echo $form->fieldSelect($model, 'site_code', \yii\helpers\ArrayHelper::map(\skeeks\cms\models\CmsSite::find()->all(), 'code', 'name'));
?>

    <?php 
echo $form->fieldSelect($model, 'user_id', \yii\helpers\ArrayHelper::map(\skeeks\cms\models\User::find()->all(), 'id', 'displayName'));
?>

    <?php 
echo $form->fieldSelect($model, 'affiliate_id', \yii\helpers\ArrayHelper::map(\skeeks\cms\shop\models\ShopAffiliate::find()->all(), 'id', 'id'));
?>

    <?php 
echo $form->fieldRadioListBoolean($model, 'fix_plan');
?>
    <?php 
echo $form->fieldRadioListBoolean($model, 'active');
?>

<?php 
echo $form->fieldSetEnd();
?>

<?php 
echo $form->buttonsCreateOrUpdate($model);
Example #4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getAffiliate()
 {
     return $this->hasOne(ShopAffiliate::className(), ['id' => 'affiliate_id']);
 }
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getShopAffiliates()
 {
     return $this->hasMany(ShopAffiliate::className(), ['plan_id' => 'id']);
 }