2020-10-13 19:21:27 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace SuiteCRM\Core\Legacy\Statistics;
|
|
|
|
|
|
|
|
use App\Entity\Statistic;
|
|
|
|
use App\Service\StatisticsProviderInterface;
|
|
|
|
|
|
|
|
class SubpanelDefault implements StatisticsProviderInterface
|
|
|
|
{
|
|
|
|
public const KEY = 'default';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritDoc
|
|
|
|
*/
|
|
|
|
public function getKey(): string
|
|
|
|
{
|
|
|
|
return self::KEY;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @inheritDoc
|
|
|
|
*/
|
|
|
|
public function getData(array $param): Statistic
|
|
|
|
{
|
|
|
|
|
|
|
|
$statistic = new Statistic();
|
|
|
|
$statistic->setId(self::KEY);
|
|
|
|
$statistic->setData([
|
|
|
|
'value' => '0'
|
|
|
|
]);
|
|
|
|
|
2020-10-27 11:08:18 +00:00
|
|
|
$statistic->setMetadata([
|
|
|
|
'type' => 'single-value-statistic',
|
|
|
|
'dataType' => 'int',
|
|
|
|
]);
|
|
|
|
|
2020-10-13 19:21:27 +01:00
|
|
|
return $statistic;
|
|
|
|
}
|
|
|
|
}
|