Version 5.0.0 beta 1
This commit is contained in:
1 parent
25ddeb65d6
commit
15c7beabc5
6736 files changed
+627902
-497943
No files matched your search
@@ -11,22 +11,25 @@
|
||||
|
||||
namespace IPS\{app}\extensions\core\OverviewStatistics;
|
||||
|
||||
use IPS\Extensions\OverviewStatisticsAbstract;
|
||||
use function defined;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Overview statistics extension: {class}
|
||||
*/
|
||||
class _{class}
|
||||
class {class} extends OverviewStatisticsAbstract
|
||||
{
|
||||
/**
|
||||
* @brief Which statistics page (activity or user)
|
||||
*/
|
||||
public $page = 'user';
|
||||
public string $page = '{statisticsPage}';
|
||||
|
||||
/**
|
||||
* Return the sub-block keys
|
||||
@@ -45,20 +48,20 @@ class _{class}
|
||||
* @param string|NULL $subBlock The subblock we are loading as returned by getBlocks()
|
||||
* @return array
|
||||
*/
|
||||
public function getBlockDetails( $subBlock = NULL ): array
|
||||
public function getBlockDetails( ?string $subBlock = NULL ): array
|
||||
{
|
||||
/* Description can be null and will not be shown if so */
|
||||
return array( 'app' => '...', 'title' => '...', 'description' => null, 'refresh' => 60 );
|
||||
return array( 'app' => '{app}', 'title' => '...', 'description' => null, 'refresh' => 60 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the block HTML to show
|
||||
*
|
||||
* @param array|NULL $dateRange NULL for all time, or an array with 'start' and 'end' \IPS\DateTime objects to restrict to
|
||||
* @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 string
|
||||
*/
|
||||
public function getBlock( $dateRange = NULL, $subBlock = NULL ): string
|
||||
public function getBlock( array|string|null $dateRange = NULL, ?string $subBlock = NULL ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user