25 return [
'STATISTIC'=>$view->prepareFieldInfos(
43 return new Page(
'STATISTIC',
44 $this->
getList($select, $filter, $order, $pageNavigation),
62 return [
'STATISTIC'=>$this->
get($id)];
85 $r = $entityTable::upsert($fields);
88 return [
'STATISTIC'=>$this->
get($r->getPrimary())];
106 $statistics = $fields[
'STATISTICS'];
107 $providerId = $fields[
'PROVIDER'][
'ID'];
113 if($r->isSuccess() ===
false)
122 $r = $entityTable::modify($statistics);
131 'PROVIDER' => $provider::getRow([
'filter'=>[
'ID'=>$providerId]]),
154 $r = parent::add($fields);
157 return [
'STATISTIC'=>$this->
get($r->getPrimary())];
176 $r = parent::update($id, $fields);
179 return [
'STATISTIC'=>$this->
get($id)];
196 $r = parent::delete($id);
216 foreach ($statistics as $k=>$statistic)
218 $statistics[$k][
'PROVIDER_ID'] = $providerId;
235 'filter'=>[
'PROVIDER_ID'=>$providerId],
236 'order'=>[
'DATE_UPDATE'=>
'DESC']]
239 if(is_array($fields))
241 $provider::update($providerId, [
'SETTINGS'=>[
'LAST_DATE_UPDATE'=>$fields[
'DATE_UPDATE']->format(
'c')]]);
277 if($name ==
'upsert' || $name ==
'modify')
283 $r = parent::checkPermissionEntity($name);
302 $r->addError(
new Error(
'Provider is not exists'));
331 $result = B24IntegrationStatProviderTable::getByPrimary($id);
332 $row = $result->fetch();
334 return (is_array($row)? $row :
null);
getList(array $select, array $filter, array $order, PageNavigation $pageNavigation=null)
checkDeletePermissionEntity()
checkReadPermissionEntity()
modifyAction(array $fields)
checkCreatePermissionEntity()
checkPackageLimit(array $data)
upsertAction(array $fields)
updateAction($id, array $fields)
onBeforeModify($providerId, $statistics)
onAfterModify($providerId)
listAction($select=[], $filter=[], $order=[], PageNavigation $pageNavigation=null)
checkPermissionEntity($name, $arguments=[])
createViewManager(Action $action)
checkUpdatePermissionEntity()