public function getParamValue($id) { $p = ResourceParam::find()->where(['table_id' => self::$tableId, 'item_id' => $this->id, 'type_id' => $id])->one(); if ($p !== null) { return $p->value; } return null; }