This repository has been archived on 2026-07-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
espocrm-base/application/Espo/Modules/Crm/Controllers/Prospect.php
T
2014-01-08 15:10:30 +02:00

26 lines
446 B
PHP

<?php
namespace Espo\Modules\Crm\Controllers;
use \Espo\Core\Exceptions\Error;
use \Espo\Core\Exceptions\BadRequest;
class Prospect extends \Espo\Core\Controllers\Record
{
public function actionConvert($params, $data)
{
if (empty($data['id'])) {
throw new BadRequest();
}
$entity = $this->getRecordService()->convert($data['id']);
if (!empty($entity)) {
return $entity->toArray();
}
throw new Error();
}
}