Exemplo n.º 1
0
 /**
  * @inheritdoc
  */
 public function rules()
 {
     return [[['shop_properties_id'], 'integer'], [['name', 'anchor', 'url'], 'string', 'max' => 255], [['shop_properties_id'], 'exist', 'skipOnError' => true, 'targetClass' => ShopProperties::className(), 'targetAttribute' => ['shop_properties_id' => 'id']]];
 }
Exemplo n.º 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getShopProperty()
 {
     return $this->hasOne(ShopProperties::className(), ['id' => 'shop_properties_id']);
 }