</div> <div class="row"> <div class="col-md-8"> <?php echo $form->field($model, 'logo_id')->widget(\skeeks\cms\widgets\formInputs\StorageImage::className()); ?> </div> </div> <?php echo $form->fieldSetEnd(); echo $form->fieldSet(\Yii::t('skeeks/shop/app', 'Payment systems')); ?> <?php echo $form->field($model, 'shopPaySystems')->checkboxList(\yii\helpers\ArrayHelper::map(\skeeks\cms\shop\models\ShopPaySystem::find()->active()->all(), 'id', 'name'))->hint(\Yii::t('skeeks/shop/app', 'if nothing is selected, it means all')); ?> <?php echo $form->fieldSetEnd(); ?> <?php echo $form->buttonsCreateOrUpdate($model); ActiveForm::end();
/** * Доступные платежные системы * * @return ShopPaySystem[] */ public function getPaySystems() { if (!$this->personType) { $query = ShopPaySystem::find()->andWhere([ShopPaySystem::tableName() . ".active" => Cms::BOOL_Y]); $query->multiple = true; return $query; } return $this->personType->getPaySystems()->andWhere([ShopPaySystem::tableName() . ".active" => Cms::BOOL_Y]); }