move kb articles

This commit is contained in:
yuri
2016-07-22 14:50:09 +03:00
parent b066d91cf5
commit ab8ba168ac
7 changed files with 241 additions and 8 deletions
@@ -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;
}
}