in api added methods: document created and get profile with reports permission
This commit is contained in:
1 parent
920aa2e751
commit
b123d250e1
10 files changed
+3921
-20
No files matched your search
@@ -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