Version 5.0.13
This commit is contained in:
1 parent
b89858b2ff
commit
5efe744c5f
1407 files changed
+69690
-30177
No files matched your search
@@ -63,6 +63,29 @@ class {class} extends OverviewStatisticsAbstract
|
||||
*/
|
||||
public function getBlock( array|string|null $dateRange = NULL, ?string $subBlock = NULL ): string
|
||||
{
|
||||
/* @todo replace this with appropriate logic for this block. It is recommended to use the numbers from the getBlockNumbers() method for consistency */
|
||||
$numbers = $this->getBlockNumbers( $dateRange, $subBlock );
|
||||
if ( isset( $numbers['statsreports_current_count'] ) )
|
||||
{
|
||||
return Theme::i()->getTemplate( 'stats', 'core', 'admin' )->overviewComparisonCount( $numbers['statsreports_current_count'], $numbers['statsreports_previous_count'] );
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the numbers for this block/subblock. These numbers are added to CSV downloads
|
||||
*
|
||||
* @param array|string|null $dateRange String for a fixed time period in days, NULL for all time, or an array with 'start' and 'end' \IPS\DateTime objects to restrict to
|
||||
* @param string|NULL $subBlock The subblock we are loading as returned by getBlocks()
|
||||
* @return ((null|number)[])|((number|null)[][]) returns an associative array mapping columns to a number or an array of numbers. Null can be used to indicate a missing or indeterminate value
|
||||
*/
|
||||
public function getBlockNumbers( array|string|null $dateRange = NULL, ?string $subBlock = NULL ): array
|
||||
{
|
||||
/* Replace with relevant columns */
|
||||
return array(
|
||||
"statsreports_current_count" => NULL,
|
||||
"statsreports_previous_count" => NULL,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user