in api added methods: document created and get profile with reports permission
This commit is contained in:
@ -110,4 +110,13 @@ class Document extends \yii\db\ActiveRecord
|
||||
{
|
||||
return $this->hasMany(DocumentFieldValue::className(), ['document_id' => 'id']);
|
||||
}
|
||||
|
||||
public static function getDocument($document_id)
|
||||
{
|
||||
return self::find()
|
||||
->joinWith(['documentFieldValues.field'])
|
||||
->where(['document.id' => $document_id])
|
||||
->asArray()
|
||||
->all();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user