mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 15:06:06 +00:00
33 lines
629 B
PHP
33 lines
629 B
PHP
<?php
|
|
|
|
namespace Espo\Controllers;
|
|
|
|
use \Espo\Core\Exceptions\Error;
|
|
|
|
class Stream extends \Espo\Core\Controllers\Base
|
|
{
|
|
public static $defaultAction = 'list';
|
|
|
|
public function actionList($params, $data, $request)
|
|
{
|
|
$scope = $params['scope'];
|
|
$id = $params['id'];
|
|
|
|
$offset = intval($request->get('offset'));
|
|
$maxSize = intval($request->get('maxSize'));
|
|
|
|
$service = $this->getService('Stream');
|
|
|
|
$result = $service->find($scope, $id, array(
|
|
'offset' => $offset,
|
|
'maxSize' => $maxSize
|
|
));
|
|
|
|
return array(
|
|
'total' => $result['total'],
|
|
'list' => $result['collection']->toArray()
|
|
);
|
|
}
|
|
}
|
|
|