Jump to content

Developer Documentation

core/OverviewStatistics

What it does

Overview extensions allow your applications to provide none content related statistics data for the ACP - Statistics Pages.

How to use

This extension requires a defined $page variable, where you can define if the provided statics data should be shown on the User or Activity Statistics page.

    /**
     * Return the sub-block keys
     *
     * @note This is designed to allow one class to support multiple blocks, for instance using the ContentRouter to generate blocks.
     * @return array
     */
    public function getBlocks()
    {
        return array( 'reactions' );
    }

The getBlocks method returns an array with all available blocks.

	/**
	 * Return block details (title and description)
	 *
	 * @param	string|NULL	$subBlock	The subblock we are loading as returned by getBlocks()
	 * @return	array
	 */
	public function getBlockDetails( $subBlock = NULL )
	{
	}

The getBlockDetails method need to return an array with following keys:

app - The app key for your application. (required)
title - Language key for the title of the block. (required) 

description - A brief description of the data. (optional)
refresh - Refresh rate of the statistics in seconds.
form - Boolean value to specify if a node filter should be provided. 

    /** 
     * 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    string|NULL    $subBlock    The subblock we are loading as returned by getBlocks()
     * @return    string
     */
    public function getBlock( $dateRange = NULL, $subBlock = NULL )
    {
    }

The getBlock method returns the rendered template from the block and can be filtered by date.


  Report Document


×
×
  • Create New...