Version 4.7.13
This commit is contained in:
1 parent
fd22d99e69
commit
7124a02564
954 files changed
+29277
-59308
No files matched your search
@@ -6,6 +6,9 @@ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* @mixin {extended_class}
|
||||
*/
|
||||
{abstract}class {classname} extends _HOOK_CLASS_
|
||||
{
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ class _{class} extends \IPS\core\AdminNotification
|
||||
* @param \IPS\Member $member The member
|
||||
* @return bool
|
||||
*/
|
||||
public static function permissionCheck( \IPS\Member $member )
|
||||
public static function permissionCheck( \IPS\Member $member ): bool
|
||||
{
|
||||
return true;// $member->hasAcpRestriction( ... );
|
||||
}
|
||||
@@ -73,7 +73,7 @@ class _{class} extends \IPS\core\AdminNotification
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function mayRecur()
|
||||
public static function mayRecur(): bool
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -83,7 +83,7 @@ class _{class} extends \IPS\core\AdminNotification
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function title()
|
||||
public function title(): string
|
||||
{
|
||||
return "Title";
|
||||
}
|
||||
@@ -93,7 +93,7 @@ class _{class} extends \IPS\core\AdminNotification
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function body()
|
||||
public function body(): string
|
||||
{
|
||||
return "Body";
|
||||
}
|
||||
@@ -103,7 +103,7 @@ class _{class} extends \IPS\core\AdminNotification
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function severity()
|
||||
public function severity(): string
|
||||
{
|
||||
return static::SEVERITY_NORMAL;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ class _{class} extends \IPS\core\AdminNotification
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function dismissible()
|
||||
public function dismissible(): string
|
||||
{
|
||||
return static::DISMISSIBLE_TEMPORARY;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ class _{class} extends \IPS\core\AdminNotification
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function style()
|
||||
public function style(): string
|
||||
{
|
||||
return static::STYLE_INFORMATION;
|
||||
}
|
||||
@@ -133,7 +133,7 @@ class _{class} extends \IPS\core\AdminNotification
|
||||
*
|
||||
* @return \IPS\Http\Url
|
||||
*/
|
||||
public function link()
|
||||
public function link(): \IPS\Http\Url
|
||||
{
|
||||
return parent::link(); // \IPS\Http\Url::internal( '...' );
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class _{class}
|
||||
* @param array $settings Current setting values
|
||||
* @return array Array with two elements: 'locations' which should have keys as the location keys and values as the fields to toggle, and 'settings' which are additional fields to add to the form
|
||||
*/
|
||||
public function getSettings( $settings )
|
||||
public function getSettings( $settings ): array
|
||||
{
|
||||
return array( 'locations' => array(), 'settings' => array() );
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class _{class}
|
||||
* @param array $values Values from the form submission
|
||||
* @return array Array of setting key => value to store
|
||||
*/
|
||||
public function parseSettings( $values )
|
||||
public function parseSettings( $values ): array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ class _{class}
|
||||
* Get Setting Field
|
||||
*
|
||||
* @param \IPS\core\Announcements\Announcement $announcement
|
||||
* @return Form element
|
||||
* @return \IPS\Helpers\Form\FormAbstract Form element
|
||||
*/
|
||||
public function getSettingField( $announcement )
|
||||
public function getSettingField( ?\IPS\core\Announcements\Announcement $announcement ): \IPS\Helpers\Form\FormAbstract
|
||||
{
|
||||
return new \IPS\Helpers\Form\Node( 'announce_download_categories', ( $announcement ) ? explode( ",", $announcement->ids ) : NULL, FALSE, array( 'class' => 'IPS\downloads\Category', 'zeroVal' => 'any', 'multiple' => TRUE ), NULL, NULL, NULL, 'announce_download_categories' );
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class _{class}
|
||||
* @param string $area The Editor area
|
||||
* @return bool
|
||||
*/
|
||||
public function permissionCheck( \IPS\Member $member, $area )
|
||||
public function permissionCheck( \IPS\Member $member, $area ): bool
|
||||
{
|
||||
return \IPS\Text\Parser::canUse( $member, 'ipsLink', $area );
|
||||
}
|
||||
@@ -52,7 +52,7 @@ class _{class}
|
||||
* @endcode
|
||||
* @return array
|
||||
*/
|
||||
public function getConfiguration()
|
||||
public function getConfiguration(): array
|
||||
{
|
||||
return array( 'tag' => 'span', 'attributes' => array( 'class' => 'example' ) );
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class _{class}
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getTags()
|
||||
public function getTags(): array
|
||||
{
|
||||
return array(
|
||||
'{some_tag}' => 'Explanation of tag',
|
||||
@@ -43,7 +43,7 @@ class _{class}
|
||||
* @param NULL|\IPS\Member $member Member object if $type is 0 or 2
|
||||
* @return array
|
||||
*/
|
||||
public function returnTagValues( $content, $type, $member )
|
||||
public function returnTagValues( string $content, int $type, ?\IPS\Member $member ): array
|
||||
{
|
||||
return array(
|
||||
'{some_tag}' => 'Value',
|
||||
|
||||
@@ -41,7 +41,7 @@ class _{class}
|
||||
* @endcode
|
||||
* @return array
|
||||
*/
|
||||
public function getPermissions( $toggles )
|
||||
public function getPermissions( $toggles ): array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
@@ -27,6 +27,11 @@ class _{class}
|
||||
* @brief Content Item Classes
|
||||
*/
|
||||
public $classes = array();
|
||||
|
||||
/**
|
||||
* @brief Can be shown in similar content
|
||||
*/
|
||||
public $similarContent = FALSE;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@@ -28,7 +28,7 @@ class _{class}
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getItems()
|
||||
public function getItems(): array
|
||||
{
|
||||
return array(
|
||||
'example_key' => array(
|
||||
|
||||
@@ -28,7 +28,7 @@ class _{class}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canView()
|
||||
public function canView(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class _{class}
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBlock()
|
||||
public function getBlock(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ class _{class}
|
||||
* @param bool $viewOnly If true, just check if the user can see the attachment rather than download it
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment, $viewOnly=FALSE )
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment, $viewOnly=FALSE ): bool
|
||||
{
|
||||
/* Make sure that you add a relevant permission check to prevent attachments being accessed via ID enumeration. */
|
||||
return TRUE;
|
||||
|
||||
@@ -46,7 +46,7 @@ class _{class}
|
||||
* @param int $limit Number to get
|
||||
* @return array array( 'Title' => array( 'http://www.example.com/file1.txt' => \IPS\File, 'http://www.example.com/file2.txt' => \IPS\File, ... ), ... )
|
||||
*/
|
||||
public function get( $member, $search, $postKey, $page, $limit )
|
||||
public function get( $member, $search, $postKey, $page, $limit ): array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class _{class}
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
public function count(): int
|
||||
{
|
||||
return \IPS\Db::i()->select( 'COUNT(*)', '...', '...' )->first();
|
||||
}
|
||||
@@ -53,7 +53,7 @@ class _{class}
|
||||
* @param string $file The file path to check
|
||||
* @return bool
|
||||
*/
|
||||
public function isValidFile( $file )
|
||||
public function isValidFile( $file ): bool
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class _{class} extends \IPS\core\FrontNavigation\FrontNavigationAbstract
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function typeTitle()
|
||||
public static function typeTitle(): string
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack('frontnavigation_{app}');
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class _{class} extends \IPS\core\FrontNavigation\FrontNavigationAbstract
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isEnabled()
|
||||
public static function isEnabled(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -50,7 +50,7 @@ class _{class} extends \IPS\core\FrontNavigation\FrontNavigationAbstract
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canAccessContent()
|
||||
public function canAccessContent(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -60,7 +60,7 @@ class _{class} extends \IPS\core\FrontNavigation\FrontNavigationAbstract
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function title()
|
||||
public function title(): string
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack('frontnavigation_{app}');
|
||||
}
|
||||
@@ -70,7 +70,7 @@ class _{class} extends \IPS\core\FrontNavigation\FrontNavigationAbstract
|
||||
*
|
||||
* @return \IPS\Http\Url
|
||||
*/
|
||||
public function link()
|
||||
public function link(): \IPS\Http\Url
|
||||
{
|
||||
return \IPS\Http\Url::internal( "app={app}" );
|
||||
}
|
||||
@@ -80,7 +80,7 @@ class _{class} extends \IPS\core\FrontNavigation\FrontNavigationAbstract
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function active()
|
||||
public function active(): bool
|
||||
{
|
||||
return \IPS\Dispatcher::i()->application->directory === '{app}';
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class _{class}
|
||||
* @param \IPS\Member\Group $group The group
|
||||
* @return void
|
||||
*/
|
||||
public function canDelete( $group ) : bool
|
||||
public function canDelete( $group ): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class _{class}
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getLimits()
|
||||
public function getLimits(): array
|
||||
{
|
||||
return array (
|
||||
'exclude' => array(),
|
||||
|
||||
@@ -26,10 +26,10 @@ class _{class}
|
||||
/**
|
||||
* Handle email
|
||||
*
|
||||
* @param \IPS\Email\Incoming $email The email
|
||||
* @param \IPS\Email\Incoming\Email $email The email
|
||||
* @return bool
|
||||
*/
|
||||
public function process( \IPS\Email\Incoming $email )
|
||||
public function process( \IPS\Email\Incoming\Emails $email ): bool
|
||||
{
|
||||
if ( FALSE )
|
||||
{
|
||||
|
||||
@@ -23,13 +23,24 @@ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Removes the logged IP address
|
||||
*
|
||||
* @param int $timestamp
|
||||
* @return void
|
||||
*/
|
||||
public function pruneIpAddresses(int $time)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Supported in the ACP IP address lookup tool?
|
||||
*
|
||||
* @return bool
|
||||
* @note If the method does not exist in an extension, the result is presumed to be TRUE
|
||||
*/
|
||||
public function supportedInAcp()
|
||||
public function supportedInAcp(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -40,7 +51,7 @@ class _{class}
|
||||
* @return bool
|
||||
* @note If the method does not exist in an extension, the result is presumed to be TRUE
|
||||
*/
|
||||
public function supportedInModCp()
|
||||
public function supportedInModCp(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ class _{class}
|
||||
* @param string $searchTerm Search Term
|
||||
* @return array Array of results
|
||||
*/
|
||||
public function getResults( $searchTerm )
|
||||
public function getResults( $searchTerm ): array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@@ -49,7 +49,7 @@ class _{class}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasAccess()
|
||||
public function hasAccess(): bool
|
||||
{
|
||||
/* Check Permissions */
|
||||
return TRUE;
|
||||
@@ -60,7 +60,7 @@ class _{class}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isDefault()
|
||||
public function isDefault(): bool
|
||||
{
|
||||
return \IPS\Dispatcher::i()->application->directory == 'myapp';
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class _{class}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEnabled()
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class _{class} extends \IPS\core\MemberACPProfile\Block
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function output()
|
||||
public function output(): string
|
||||
{
|
||||
return "Hello, World!";
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class _{class} extends \IPS\core\MemberACPProfile\Block
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function output()
|
||||
public function output(): string
|
||||
{
|
||||
return "Hello, World!";
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class _{class} extends \IPS\core\MemberACPProfile\MainTab
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function leftColumnBlocks()
|
||||
public function leftColumnBlocks(): array
|
||||
{
|
||||
return array(
|
||||
'IPS\{app}\extensions\core\MemberACPProfileBlocks\BlockName',
|
||||
@@ -40,7 +40,7 @@ class _{class} extends \IPS\core\MemberACPProfile\MainTab
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function mainColumnBlocks()
|
||||
public function mainColumnBlocks(): array
|
||||
{
|
||||
return array(
|
||||
'IPS\{app}\extensions\core\MemberACPProfileBlocks\BlockName',
|
||||
@@ -52,7 +52,7 @@ class _{class} extends \IPS\core\MemberACPProfile\MainTab
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rightColumnBlocks()
|
||||
public function rightColumnBlocks(): array
|
||||
{
|
||||
return array(
|
||||
'IPS\{app}\extensions\core\MemberACPProfileBlocks\BlockName',
|
||||
|
||||
@@ -29,7 +29,7 @@ class _{class}
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getData( \IPS\Member $member )
|
||||
public function getData( \IPS\Member $member ): array
|
||||
{
|
||||
$return = array();
|
||||
return $return;
|
||||
|
||||
@@ -29,7 +29,7 @@ class _{class}
|
||||
* @param string $area Area to check
|
||||
* @return bool
|
||||
*/
|
||||
public function availableIn( $area )
|
||||
public function availableIn( $area ): bool
|
||||
{
|
||||
return \in_array( $area, array( 'bulkmail', 'group_promotions' ) );
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class _{class}
|
||||
* @param mixed $criteria Value returned from the save() method
|
||||
* @return array Array of form elements
|
||||
*/
|
||||
public function getSettingField( $criteria )
|
||||
public function getSettingField( $criteria ): array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@@ -90,7 +90,7 @@ class _{class}
|
||||
* @param object|NULL $object Calling class
|
||||
* @return bool
|
||||
*/
|
||||
public function matches( \IPS\Member $member, $filters, $object=NULL )
|
||||
public function matches( \IPS\Member $member, $filters, $object=NULL ): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,6 @@ class _{class}
|
||||
*/
|
||||
public function save( $values, &$member )
|
||||
{
|
||||
$member->example = $values['example'];
|
||||
$member->example = $values['example'];
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ class _{class}
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getTypes()
|
||||
public function getTypes(): array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@@ -40,7 +40,7 @@ class _{class}
|
||||
* @param array $row entire log row
|
||||
* @return string
|
||||
*/
|
||||
public function parseLogType( $value, $row )
|
||||
public function parseLogType( $value, $row ): string
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
@@ -52,7 +52,7 @@ class _{class}
|
||||
* @param array $row entire log row
|
||||
* @return string
|
||||
*/
|
||||
public function parseLogData( $value, $row )
|
||||
public function parseLogData( $value, $row ): string
|
||||
{
|
||||
return $value;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ class _{class} extends \IPS\core\MemberACPProfile\Restriction
|
||||
* @param array $values Values from form
|
||||
* @return array
|
||||
*/
|
||||
public function save( $values )
|
||||
public function save( $values ): array
|
||||
{
|
||||
$return = array();
|
||||
|
||||
@@ -55,7 +55,7 @@ class _{class} extends \IPS\core\MemberACPProfile\Restriction
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function activeRestrictions()
|
||||
public function activeRestrictions(): array
|
||||
{
|
||||
$return = array();
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class _{class}
|
||||
* @endcode
|
||||
* @return array
|
||||
*/
|
||||
public function getPermissions()
|
||||
public function getPermissions(): array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class _{class}
|
||||
* @param \IPS\Member|null $member The member (to take out any notification types a given member will never see) or NULL if this is for the ACP
|
||||
* @return array
|
||||
*/
|
||||
public static function configurationOptions( \IPS\Member $member = NULL )
|
||||
public static function configurationOptions( \IPS\Member $member = NULL ): array
|
||||
{
|
||||
// Return an array defining each notification type, including the form elements necessary to allow its configuration
|
||||
|
||||
@@ -111,7 +111,7 @@ class _{class}
|
||||
);
|
||||
* @endcode
|
||||
*/
|
||||
public function parse_key( \IPS\Notification\Inline $notification, $htmlEscape=TRUE )
|
||||
public function parse_key( \IPS\Notification\Inline $notification, $htmlEscape=TRUE ): array
|
||||
{
|
||||
return array(
|
||||
'title' => "Mark has replied to A Topic", // The notification title
|
||||
|
||||
@@ -26,14 +26,14 @@ class _{class}
|
||||
/**
|
||||
* @brief Can be used when compiling CSS
|
||||
*/
|
||||
public static $canBeUsedInCss = FALSE;
|
||||
public static bool $canBeUsedInCss = FALSE;
|
||||
|
||||
/**
|
||||
* Run the plug-in
|
||||
*
|
||||
* @param string $data The initial data from the tag
|
||||
* @param array $options Array of options
|
||||
* @return string Code to eval
|
||||
* @return array|string string with code to eval or array( 'pre' => Code to eval before 'return', 'return' => Code to eval to return desired value )
|
||||
*/
|
||||
public static function runPlugin( $data, $options )
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ class _{class}
|
||||
* @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()
|
||||
public function getBlocks(): array
|
||||
{
|
||||
return array( 'subblockKey' );
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class _{class}
|
||||
* @param string|NULL $subBlock The subblock we are loading as returned by getBlocks()
|
||||
* @return array
|
||||
*/
|
||||
public function getBlockDetails( $subBlock = NULL )
|
||||
public function getBlockDetails( $subBlock = NULL ): array
|
||||
{
|
||||
/* Description can be null and will not be shown if so */
|
||||
return array( 'app' => '...', 'title' => '...', 'description' => null, 'refresh' => 60 );
|
||||
@@ -58,7 +58,7 @@ class _{class}
|
||||
* @param string|NULL $subBlock The subblock we are loading as returned by getBlocks()
|
||||
* @return string
|
||||
*/
|
||||
public function getBlock( $dateRange = NULL, $subBlock = NULL )
|
||||
public function getBlock( $dateRange = NULL, $subBlock = NULL ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class _{class}
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getNodeClasses()
|
||||
public function getNodeClasses(): array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class _{class}
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function showTab()
|
||||
public function showTab(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ class _{class}
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render()
|
||||
public function render(): string
|
||||
{
|
||||
return 'content to display';
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class _{class}
|
||||
*
|
||||
* @return array array( 'key' => 'lang_string' )
|
||||
*/
|
||||
public static function actions()
|
||||
public static function actions(): array
|
||||
{
|
||||
return array( );
|
||||
}
|
||||
@@ -38,7 +38,7 @@ class _{class}
|
||||
*
|
||||
* @return array array( 'key' => 'lang_string' )
|
||||
*/
|
||||
public static function subActions()
|
||||
public static function subActions(): array
|
||||
{
|
||||
return array( );
|
||||
}
|
||||
@@ -49,7 +49,7 @@ class _{class}
|
||||
* @param string $action Action key (basic_profile, etc)
|
||||
* @return boolean
|
||||
*/
|
||||
public static function actionMultipleChoice( $action )
|
||||
public static function actionMultipleChoice( $action ): bool
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -61,7 +61,7 @@ class _{class}
|
||||
* @param \IPS\Member|NULL $member The member to check, or NULL for currently logged in
|
||||
* @return bool
|
||||
*/
|
||||
public function completed( \IPS\Member\ProfileStep $step, \IPS\Member $member = NULL )
|
||||
public function completed( \IPS\Member\ProfileStep $step, \IPS\Member $member = NULL ): bool
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -72,7 +72,7 @@ class _{class}
|
||||
* @return array
|
||||
* @note This is intended for items which have their own independent settings and dedicated enable pages, such as MFA and Social Login integration
|
||||
*/
|
||||
public static function canBeRequired()
|
||||
public static function canBeRequired(): array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@@ -84,7 +84,7 @@ class _{class}
|
||||
* @param \IPS\Member|NULL $member The member, or NULL for currently logged in
|
||||
* @return \IPS\Http\Url
|
||||
*/
|
||||
public function url( $action, \IPS\Member $member = NULL )
|
||||
public function url( $action, \IPS\Member $member = NULL ): \IPS\Http\Url
|
||||
{
|
||||
return \IPS\Http\Url::internal( '' );
|
||||
}
|
||||
@@ -120,7 +120,7 @@ class _{class}
|
||||
* @param \IPS\Member $member Member or NULL for currently logged in member
|
||||
* @return array
|
||||
*/
|
||||
public static function wizard( \IPS\Member $member = NULL )
|
||||
public static function wizard( \IPS\Member $member = NULL ): array
|
||||
{
|
||||
return array( );
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class _{class}
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
public function preQueueData( $data )
|
||||
public function preQueueData( $data ): ?array
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
@@ -55,7 +55,7 @@ class _{class}
|
||||
* @return array( 'text' => 'Doing something...', 'complete' => 50 ) Text explaining task and percentage complete
|
||||
* @throws \OutOfRangeException Indicates offset doesn't exist and thus task is complete
|
||||
*/
|
||||
public function getProgress( $data, $offset )
|
||||
public function getProgress( $data, $offset ): array
|
||||
{
|
||||
return array( 'text' => 'Doing something...', 'complete' => 50 );
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ class _{class}
|
||||
* @param \IPS\Helpers\Form $form The form
|
||||
* @return void
|
||||
*/
|
||||
public function form( &$form )
|
||||
public function form( \IPS\Helpers\Form &$form )
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'example' ) );
|
||||
}
|
||||
@@ -57,6 +57,6 @@ class _{class}
|
||||
*/
|
||||
public function saveForm( $values)
|
||||
{
|
||||
return $values;
|
||||
return $values;
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ class _{class}
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function settings()
|
||||
public function settings(): array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@@ -63,7 +63,7 @@ class _{class}
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getFilenames()
|
||||
public function getFilenames(): array
|
||||
{
|
||||
return array( 'sitemap_' . mb_strtolower('{class}') );
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Statistics Chart Extension
|
||||
* @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/
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\Statistics;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Statistics Chart Extension
|
||||
*/
|
||||
class _{class} extends \IPS\core\Statistics\Chart
|
||||
{
|
||||
/**
|
||||
* @brief Controller
|
||||
*/
|
||||
public $controller = NULL;
|
||||
|
||||
/**
|
||||
* Render Chart
|
||||
*
|
||||
* @param \IPS\Http\Url $url URL the chart is being shown on.
|
||||
* @return \IPS\Helpers\Chart
|
||||
*/
|
||||
public function getChart( \IPS\Http\Url $url ): \IPS\Helpers\Chart
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -29,9 +29,9 @@ class _{class}
|
||||
* @param \IPS\Member|NULL $author The author to limit extra items to
|
||||
* @param Timestamp|NULL $lastTime If provided, only items since this date are included. If NULL, it works out which to include based on what results are being shown
|
||||
* @param Timestamp|NULL $firstTime If provided, only items before this date are included. If NULL, it works out which to include based on what results are being shown
|
||||
* @return array Array of \IPS\Content\Search\Result\Custom objects
|
||||
* @return array Array of \IPS\Content\Search\Result\Custom objects
|
||||
*/
|
||||
public function extraItems( $author=NULL, $lastTime=NULL, $firstTime=NULL )
|
||||
public function extraItems( $author=NULL, $lastTime=NULL, $firstTime=NULL ): array
|
||||
{
|
||||
// Note!
|
||||
// Your application must define a setting and a language string in the format of "all_activity_{application}_{extensionname}" all in lower case. Without this, this plugin will not be executed.
|
||||
|
||||
@@ -27,7 +27,7 @@ class _{class}
|
||||
* Code to execute before the application has been uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @return array
|
||||
* @return void
|
||||
*/
|
||||
public function preUninstall( $application )
|
||||
{
|
||||
@@ -37,7 +37,7 @@ class _{class}
|
||||
* Code to execute after the application has been uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @return array
|
||||
* @return void
|
||||
*/
|
||||
public function postUninstall( $application )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user