예제 #1
0
파일: Attr.php 프로젝트: cboy868/nana
 public static function getValMap($attr_id)
 {
     $vals = AttrVal::find()->where(['attr_id' => $attr_id, 'status' => AttrVal::STATUS_ACTIVE])->orderBy('val asc')->asArray()->all();
     $vals = ArrayHelper::map($vals, 'id', 'val');
     return $vals;
 }
예제 #2
0
파일: AvRel.php 프로젝트: cboy868/nana
 public function getVal()
 {
     return $this->hasOne(AttrVal::className(), ['id' => 'av_id']);
 }