move kb articles
This commit is contained in:
@@ -40,4 +40,34 @@ class KnowledgeBaseArticle extends \Espo\Core\Controllers\Record
|
||||
|
||||
return $this->getRecordService()->getCopiedAttachments($id);
|
||||
}
|
||||
|
||||
public function postActionMoveUp($params, $data, $request)
|
||||
{
|
||||
if (empty($data['id'])) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
$where = null;
|
||||
if (!empty($data['where'])) {
|
||||
$where = $data['where'];
|
||||
}
|
||||
|
||||
$this->getRecordService()->moveUp($data['id'], $where);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function postActionMoveDown($params, $data, $request)
|
||||
{
|
||||
if (empty($data['id'])) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
$where = null;
|
||||
if (!empty($data['where'])) {
|
||||
$where = $data['where'];
|
||||
}
|
||||
|
||||
$this->getRecordService()->moveDown($data['id'], $where);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user