Version 5.0.13
This commit is contained in:
1 parent
b89858b2ff
commit
5efe744c5f
1407 files changed
+69690
-30177
No files matched your search
@@ -43,11 +43,11 @@ class {key} extends {class}
|
||||
*/
|
||||
public function init() : void
|
||||
{
|
||||
parent::init();
|
||||
|
||||
// Use this to perform any set up and to assign a template that is not in the following format:
|
||||
// $this->template( array( \IPS\Theme::i()->getTemplate( 'widgets', $this->app, 'front' ), $this->key ) );
|
||||
// Note: parent::init() will set a default template, so make sure your template is defined after the parent is called.
|
||||
// Note: parent::init() will set a default template if you haven't, so make sure your template is defined BEFORE the parent is called.
|
||||
|
||||
parent::init();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,7 +38,7 @@ class {class} extends AchievementActionAbstract // NOTE: Other classes exist to
|
||||
*/
|
||||
//public function filters( ?array $filters, Url $url ): array
|
||||
//{
|
||||
// return [];
|
||||
// return parent::filters( $filters, $url );
|
||||
//}
|
||||
|
||||
/**
|
||||
@@ -49,7 +49,7 @@ class {class} extends AchievementActionAbstract // NOTE: Other classes exist to
|
||||
*/
|
||||
//public function formatFilterValues( array $values ): array
|
||||
//{
|
||||
// return [];
|
||||
// return parent::formatFilterValues( $values );
|
||||
//}
|
||||
|
||||
/**
|
||||
|
||||
@@ -54,7 +54,7 @@ class {class} extends BuildAbstract
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function finish() : void
|
||||
public function finish() : void
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief MemberACPManagement: {class}
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\MemberACPManagement;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
|
||||
use Callback;
|
||||
use IPS\Extensions\MemberACPManagementAbstract;
|
||||
use IPS\Helpers\Table\Table;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Member Management: {class}
|
||||
*/
|
||||
class {class} extends MemberACPManagementAbstract
|
||||
{
|
||||
/**
|
||||
* Additional columns allowed in the member export.
|
||||
* Return an array where the key is the column name
|
||||
* and the value is a language string
|
||||
*
|
||||
* @return array<string,string>
|
||||
*/
|
||||
public function exportColumns() : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Additional columns to show in the ACP member list
|
||||
* Return an array where the key is the column name
|
||||
* and the value is an optional callback method for @see Table::$parsers
|
||||
*
|
||||
* @return array<string,?Callback>
|
||||
*/
|
||||
public function acpColumns() : array
|
||||
{
|
||||
/* Example:
|
||||
return array(
|
||||
'column1' => null,
|
||||
'column2' => function( $val, $row )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
);*/
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -26,14 +26,5 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends PermissionsAbstract
|
||||
{
|
||||
/**
|
||||
* Get node classes
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getNodeClasses(): array
|
||||
{
|
||||
return array( '{node}' );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,9 +11,11 @@
|
||||
|
||||
namespace IPS\{app}\extensions\core\RssImport;
|
||||
|
||||
use IPS\Content;
|
||||
use IPS\core\Rss\Import;
|
||||
use IPS\Extensions\RssImportAbstract;
|
||||
use IPS\Helpers\Form;
|
||||
use IPS\Node\Model;
|
||||
use function defined;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
@@ -38,6 +40,17 @@ class {class} extends RssImportAbstract
|
||||
$this->classes[] = '{item}';
|
||||
}
|
||||
|
||||
/**
|
||||
* Node selector options
|
||||
*
|
||||
* @param Import|null $rss Existing RSS object if editing|null if not
|
||||
* @return array
|
||||
*/
|
||||
public function nodeSelectorOptions( ?Import $rss ): array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Form
|
||||
*
|
||||
@@ -61,4 +74,16 @@ class {class} extends RssImportAbstract
|
||||
{
|
||||
return $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Import $rss RSS object
|
||||
* @param array $article RSS feed article importing
|
||||
* @param Model $container Container object
|
||||
* @param string $content Post content with read more link if set
|
||||
* @return Content|null
|
||||
*/
|
||||
public function create( Import $rss, array $article, Model $container, string $content ): ?Content
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user