public cutAction ( ) : Zend\View\Model\JsonModel | ||
Результат | Zend\View\Model\JsonModel |
public function cutAction()
{
$documentId = $this->getRouteMatch()->getParam('id');
if (empty($documentId)) {
return $this->returnJson(array('success' => false));
}
$session = $this->getSession();
if (!empty($session['document-copy'])) {
unset($session['document-copy']);
}
$session['document-cut'] = $documentId;
return $this->returnJson(array('success' => true));
}