Version 5.0.0 beta 5
This commit is contained in:
1 parent
2f24f9de48
commit
57d9db6ce2
218 files changed
+5331
-7416
No files matched your search
@@ -36,26 +36,26 @@ class {class} extends AchievementActionAbstract // NOTE: Other classes exist to
|
||||
* @param Url $url The URL the form is being shown on
|
||||
* @return array
|
||||
*/
|
||||
public function filters( ?array $filters, Url $url ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
//public function filters( ?array $filters, Url $url ): array
|
||||
//{
|
||||
// return [];
|
||||
//}
|
||||
|
||||
/**
|
||||
* Format filter form values
|
||||
*
|
||||
* @param array $values The values from the form
|
||||
* @return array
|
||||
*/
|
||||
public function formatFilterValues( array $values ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
//public function formatFilterValues( array $values ): array
|
||||
//{
|
||||
// return [];
|
||||
//}
|
||||
|
||||
/**
|
||||
* Work out if the filters applies for a given action
|
||||
*
|
||||
* Important note for milestones: consider the context. This method is called by \IPS\Member::achievementAction(). If your code
|
||||
* Important note for milestones: consider the context. This method is called by \IPS\Member::achievementAction(). If your code
|
||||
* calls that BEFORE making its change in the database (or there is read/write separation), you will need to add
|
||||
* 1 to the value being considered for milestones
|
||||
*
|
||||
@@ -64,11 +64,11 @@ class {class} extends AchievementActionAbstract // NOTE: Other classes exist to
|
||||
* @param mixed $extra Any additional information about what is happening (e.g. if a post is being made: the post object)
|
||||
* @return bool
|
||||
*/
|
||||
public function filtersMatch( MemberClass $subject, array $filters, mixed $extra = NULL ): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//public function filtersMatch( MemberClass $subject, array $filters, mixed $extra = NULL ): bool
|
||||
//{
|
||||
// return TRUE;
|
||||
//}
|
||||
|
||||
/**
|
||||
* Get the labels for the people this action might give awards to
|
||||
*
|
||||
|
||||
@@ -52,37 +52,6 @@ class {class} extends AdminNotification
|
||||
{
|
||||
return 'acp_notification_{class}';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can a member access this type of notification?
|
||||
*
|
||||
* @param MemberClass $member The member
|
||||
* @return bool
|
||||
*/
|
||||
public static function permissionCheck( MemberClass $member ): bool
|
||||
{
|
||||
return true;// $member->hasAcpRestriction( ... );
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this type of notification ever optional (controls if it will be selectable as "viewable" in settings)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function mayBeOptional(): bool
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this type of notification might recur (controls what options will be available for the email setting)
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function mayRecur(): bool
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notification Title (full HTML, must be escaped where necessary)
|
||||
@@ -123,14 +92,4 @@ class {class} extends AdminNotification
|
||||
{
|
||||
return static::DISMISSIBLE_TEMPORARY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Quick link from popup menu
|
||||
*
|
||||
* @return Url
|
||||
*/
|
||||
public function link(): Url
|
||||
{
|
||||
return parent::link(); // Url::internal( '...' );
|
||||
}
|
||||
}
|
||||
@@ -49,16 +49,4 @@ class {class} extends AdvertisementLocationsAbstract
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the advertisement can be displayed, based on settings
|
||||
*
|
||||
* @param AdvertisementClass $advertisement
|
||||
* @param string $location
|
||||
* @return bool
|
||||
*/
|
||||
public function canShow( AdvertisementClass $advertisement, string $location ) : bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,6 @@ namespace IPS\{app}\extensions\core\ApprovalReason;
|
||||
|
||||
use IPS\core\Approval as ApprovalClass;
|
||||
use IPS\Extensions\ApprovalReasonAbstract;
|
||||
use RuntimeException;
|
||||
use function defined;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
@@ -41,6 +40,8 @@ class {class} extends ApprovalReasonAbstract
|
||||
|
||||
/**
|
||||
* Parse Reason
|
||||
* Return an array with 2 elements: lang (the language string to use)
|
||||
* and sprintf (an array of replacements)
|
||||
*
|
||||
* @param ApprovalClass $approval Approval row
|
||||
* @return array
|
||||
|
||||
@@ -18,7 +18,6 @@ use IPS\Extensions\ClubAbstract;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Member;
|
||||
use IPS\Node\Model;
|
||||
use RuntimeException;
|
||||
use function defined;
|
||||
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
@@ -35,8 +34,8 @@ class {class} extends ClubAbstract
|
||||
/**
|
||||
* Tabs
|
||||
*
|
||||
* @param \IPS\Member\Club $club The club
|
||||
* @param \IPS\Node\Model $container Container
|
||||
* @param Club $club The club
|
||||
* @param Model|null $container Container
|
||||
* @return array
|
||||
*/
|
||||
public function tabs( Club $club, ?Model $container = NULL ): array
|
||||
|
||||
@@ -19,6 +19,7 @@ use IPS\Http\Url;
|
||||
use IPS\Member as MemberClass;
|
||||
use IPS\Output;
|
||||
use IPS\Theme;
|
||||
use IPS\Settings;
|
||||
use LogicException;
|
||||
use function defined;
|
||||
|
||||
|
||||
@@ -30,12 +30,6 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends ContentRouterAbstract
|
||||
{
|
||||
/**
|
||||
* @brief Can be shown in similar content
|
||||
*/
|
||||
public bool $similarContent = FALSE;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -62,52 +62,6 @@ class {class} extends CustomFieldAbstract
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be overridden by individual extension implementations
|
||||
* to allow for a field to be available only in certain connditions
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isEnabled() : bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* A list of form elements that will be toggled on when this field
|
||||
* type is selected
|
||||
* @see CustomField::$additionalFieldToggles
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function fieldTypeToggles() : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add fields to the field creation form
|
||||
*
|
||||
* @param Form $form
|
||||
* @param CustomField $field The field currently being modified
|
||||
* @return void
|
||||
*/
|
||||
public static function form( Form $form, CustomField $field ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Process values from the ACP Custom Field form
|
||||
*
|
||||
* @param array $values
|
||||
* @return array
|
||||
*/
|
||||
public static function formatFormValues( array $values ) : array
|
||||
{
|
||||
return $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display Value
|
||||
* @see CustomField::displayValue()
|
||||
|
||||
@@ -76,39 +76,4 @@ class {class} extends EditorLocationsAbstract
|
||||
return NULL;
|
||||
// return Url::internal( ... );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild content post-upgrade
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
//public function rebuildContent( ?int $offset, ?int $max ): int
|
||||
//{
|
||||
//}
|
||||
|
||||
/**
|
||||
* Rebuild content to add or remove lazy loading
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @param bool $status Enable/Disable lazy loading
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
//public function rebuildLazyLoad( ?int $offset, ?int $max, bool $status=TRUE ): int
|
||||
//{
|
||||
//}
|
||||
|
||||
/**
|
||||
* Total content count to be used in progress indicator
|
||||
*
|
||||
* @return int Total Count
|
||||
*/
|
||||
//public function contentCount() : int
|
||||
//{
|
||||
// return \IPS\Db::i()->select( 'COUNT(*) as count', '...', "..." )->setKeyField('count')->first();
|
||||
//}
|
||||
}
|
||||
@@ -45,28 +45,6 @@ class {class} extends FrontNavigationAbstract
|
||||
return MemberClass::loggedIn()->language()->addToStack('frontnavigation_{app}');
|
||||
}
|
||||
|
||||
/**
|
||||
* Can this item be used at all?
|
||||
* For example, if this will link to a particular feature which has been diabled, it should
|
||||
* not be available, even if the user has permission
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public static function isEnabled(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can the currently logged in user access the content this item links to?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canAccessContent(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Title
|
||||
*
|
||||
@@ -96,15 +74,4 @@ class {class} extends FrontNavigationAbstract
|
||||
{
|
||||
return Dispatcher::i()->application->directory === '{app}';
|
||||
}
|
||||
|
||||
/**
|
||||
* Children
|
||||
*
|
||||
* @param bool $noStore If true, will skip datastore and get from DB (used for ACP preview)
|
||||
* @return array|null
|
||||
*/
|
||||
public function children( bool $noStore=FALSE ): ?array
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -52,15 +52,4 @@ class {class} extends GroupFormAbstract
|
||||
{
|
||||
$group->example = $values['example'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Can this group be deleted?
|
||||
*
|
||||
* @param SystemGroup $group The group
|
||||
* @return bool
|
||||
*/
|
||||
public function canDelete( SystemGroup $group ): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -33,39 +33,6 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
class {class} extends IpAddressesAbstract
|
||||
{
|
||||
/**
|
||||
* Removes the logged IP address
|
||||
*
|
||||
* @param int $time
|
||||
* @return void
|
||||
*/
|
||||
public function pruneIpAddresses( int $time ) : void
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* 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(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Supported in the ModCP 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 supportedInModCp(): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find Records by IP
|
||||
*
|
||||
* @param string $ip The IP Address
|
||||
|
||||
@@ -28,16 +28,6 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends LiveSearchAbstract
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
/* Check Permissions */
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the search results
|
||||
*
|
||||
|
||||
@@ -18,57 +18,5 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends LoaderAbstract
|
||||
{
|
||||
/**
|
||||
* Additional CSS files to load
|
||||
*
|
||||
* @return array<string|Url>
|
||||
*/
|
||||
public function css(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Additional JS files to load
|
||||
*
|
||||
* @return array<string|Url>
|
||||
*/
|
||||
public function js(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* If a redirect is needed, return the URL
|
||||
* or NULL to continue
|
||||
*
|
||||
* @return Url|null
|
||||
*/
|
||||
public function checkForRedirect() : Url|null
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a custom error message or null to use the default
|
||||
*
|
||||
* @param string $message
|
||||
* @param mixed $code
|
||||
* @param int $httpStatusCode
|
||||
* @return string|null
|
||||
*/
|
||||
public function customError( string $message, mixed $code, int $httpStatusCode ) : string|null
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run custom code right on Dispatcher::finish()
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function onFinish() : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -49,16 +49,4 @@ class {class} extends MainTab
|
||||
'IPS\{app}\extensions\core\MemberACPProfileBlocks\BlockName',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get right-column blocks
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rightColumnBlocks(): array
|
||||
{
|
||||
return array(
|
||||
'IPS\{app}\extensions\core\MemberACPProfileBlocks\BlockName',
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,6 @@ class {class} extends MemberExportPiiAbstract
|
||||
*/
|
||||
public function getData( MemberClass $member ): array
|
||||
{
|
||||
$return = array();
|
||||
return $return;
|
||||
return array();
|
||||
}
|
||||
}
|
||||
@@ -76,31 +76,4 @@ class {class} extends MemberFilterAbstract
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback for member retrieval database query
|
||||
* Can be used to set joins
|
||||
*
|
||||
* @param array $data The array returned from the save() method
|
||||
* @param Select $query The query
|
||||
* @return void
|
||||
*/
|
||||
public function queryCallback( array $data, Select $query ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a member matches specified filters
|
||||
*
|
||||
* @note This is only necessary if availableIn() includes group_promotions
|
||||
* @param MemberClass $member Member object to check
|
||||
* @param array $filters Previously defined filters
|
||||
* @param object|NULL $object Calling class
|
||||
* @return bool
|
||||
*/
|
||||
public function matches( MemberClass $member, array $filters, ?object $object=NULL ): bool
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -29,66 +29,4 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends Restriction
|
||||
{
|
||||
/**
|
||||
* Modify Edit Restrictions form
|
||||
*
|
||||
* @param Form $form The form
|
||||
* @return void
|
||||
*/
|
||||
public function form( Form $form ) : void
|
||||
{
|
||||
// $form->add( ... );
|
||||
}
|
||||
|
||||
/**
|
||||
* Save Form
|
||||
*
|
||||
* @param array $values Values from form
|
||||
* @return array
|
||||
*/
|
||||
public function save( array $values ): array
|
||||
{
|
||||
$return = array();
|
||||
|
||||
// $return['my_restriction'] = array( 'old' => $oldValue, 'new' => $values['my_restriction'] ); // used in changesForHistory()
|
||||
// Db::i()->update( ... ); // Actually save the value
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* What restrictions are active on the account?
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function activeRestrictions(): array
|
||||
{
|
||||
$return = array();
|
||||
|
||||
/*if ( ... )
|
||||
{
|
||||
$return[] = 'my_restricion';
|
||||
}*/
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get details of a change to show on history
|
||||
*
|
||||
* @param array $changes Changes as set in save()
|
||||
* @param array $row Row of data from member history table.
|
||||
* @return array
|
||||
*/
|
||||
public static function changesForHistory( array $changes, array $row ): array
|
||||
{
|
||||
$return = array();
|
||||
|
||||
if ( isset( $changes['my_restriction'] ) )
|
||||
{
|
||||
$return[] = MemberClass::loggedIn()->language()->addToStack( 'changed_my_restriction', FALSE, array( 'sprintf' => array( $changes['my_restriction']['new'], $changes['my_restriction']['new'] ) ) );
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
@@ -52,27 +52,4 @@ class {class} extends ModeratorPermissionsAbstract
|
||||
'can_delete_course_content' => "YesNo",*/
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* After change
|
||||
*
|
||||
* @param array $moderator The moderator
|
||||
* @param array $changed Values that were changed
|
||||
* @return void
|
||||
*/
|
||||
public function onChange( array $moderator, array $changed ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* After delete
|
||||
*
|
||||
* @param array $moderator The moderator
|
||||
* @return void
|
||||
*/
|
||||
public function onDelete( array $moderator ) : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -60,42 +60,6 @@ class {class} extends NotificationsAbstract
|
||||
//...
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save "extra" value
|
||||
*
|
||||
* @param MemberClass|NULL $member The member or NULL if this is the admin setting defaults
|
||||
* @param string $key The key
|
||||
* @param bool $value The value
|
||||
* @return void
|
||||
*/
|
||||
public static function saveExtra( ?MemberClass $member, string $key, bool $value ) : void
|
||||
{
|
||||
// You can perform extra processing here to save values in a specific manner if needed
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable all "extra" values for a particular type
|
||||
*
|
||||
* @param MemberClass|NULL $member The member or NULL if this is the admin setting defaults
|
||||
* @param string $method The method type
|
||||
* @return void
|
||||
*/
|
||||
public static function disableExtra( ?MemberClass $member, string $method ) : void
|
||||
{
|
||||
// You can disable extra values for a given type, such as if a setting means the notification preference is irrelevant
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset "extra" value to the default for all accounts
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function resetExtra() : void
|
||||
{
|
||||
// Any extra processing you may need to perform when resetting all members to default notification options.
|
||||
// Typically you won't have to do anything here unless you have custom settings
|
||||
}
|
||||
|
||||
// For each type of notification you need a method like this which controls what will be displayed when the user clicks on the notification icon in the header:
|
||||
// Note that for each type of notification you must *also* create email templates. See documentation for details: https://remoteservices.invisionpower.com/docs/devdocs-notifications
|
||||
|
||||
@@ -49,17 +49,6 @@ class {class} extends ProfileStepsAbstract
|
||||
{
|
||||
return array( );
|
||||
}
|
||||
|
||||
/**
|
||||
* Can the actions have multiple choices?
|
||||
*
|
||||
* @param string $action Action key (basic_profile, etc)
|
||||
* @return bool|null
|
||||
*/
|
||||
public static function actionMultipleChoice( string $action ): ?bool
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Has a specific step been completed?
|
||||
@@ -72,54 +61,6 @@ class {class} extends ProfileStepsAbstract
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be set as required?
|
||||
*
|
||||
* @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(): array
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Action URL
|
||||
*
|
||||
* @param string $action The action
|
||||
* @param MemberClass|NULL $member The member, or NULL for currently logged in
|
||||
* @return Url|null
|
||||
*/
|
||||
public function url( string $action, ?MemberClass $member = NULL ): ?Url
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Post ACP Save
|
||||
*
|
||||
* @param ProfileStep $step The step
|
||||
* @param array $values Form Values
|
||||
* @return void
|
||||
*/
|
||||
public function postAcpSave( ProfileStep $step, array $values ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Format Form Values
|
||||
*
|
||||
* @param array $values The values from the form
|
||||
* @param MemberClass $member The member
|
||||
* @param Form $form The form
|
||||
* @return void
|
||||
*/
|
||||
public static function formatFormValues( array $values, MemberClass $member, Form $form ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Wizard Steps
|
||||
@@ -131,15 +72,4 @@ class {class} extends ProfileStepsAbstract
|
||||
{
|
||||
return array( );
|
||||
}
|
||||
|
||||
/**
|
||||
* Post Delete
|
||||
*
|
||||
* @param ProfileStep $step The step
|
||||
* @return void
|
||||
*/
|
||||
public function onDelete( ProfileStep $step ) : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -64,16 +64,4 @@ class {class} extends QueueAbstract
|
||||
{
|
||||
return array( 'text' => 'Doing something...', 'complete' => 50 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform post-completion processing
|
||||
*
|
||||
* @param array $data Data returned from preQueueData
|
||||
* @param bool $processed Was anything processed or not? If preQueueData returns NULL, this will be FALSE.
|
||||
* @return void
|
||||
*/
|
||||
public function postComplete( array $data, bool $processed = TRUE ) : void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -28,59 +28,6 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends SSOAbstract
|
||||
{
|
||||
/**
|
||||
* Determine if the extension is currently enabled
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of setting keys that will be overridden by this extension
|
||||
* Example: post_before_registering might always return a value of 0
|
||||
* Would return an array like [ 'post_before_registering' => 0 ]
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function overrideSettings(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return URL guest should be redirected to for login
|
||||
*
|
||||
* @return Url|null
|
||||
*/
|
||||
public function loginUrl(): Url|null
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return URL guest should be redirect to for login
|
||||
*
|
||||
* @param Url $redirectUrl
|
||||
* @return Url|null
|
||||
*/
|
||||
public function logoutUrl( Url $redirectUrl ): Url|null
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return URL user should visit to change display name
|
||||
*
|
||||
* @return Url|null
|
||||
*/
|
||||
public function displayNameChange(): Url|null
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom logic executed on session init
|
||||
*
|
||||
@@ -103,14 +50,4 @@ class {class} extends SSOAbstract
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Does SSO support login as?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function supportsLoginAs(): bool
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -21,77 +21,8 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends UIComment
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Class to extend
|
||||
*/
|
||||
public static ?string $class = '{comment}';
|
||||
|
||||
/**
|
||||
* Can be used to add additional css classes to the comment
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return string
|
||||
*/
|
||||
public function css( BaseComment $comment ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to add additional data attributes to the comment
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return string
|
||||
*/
|
||||
public function dataAttributes( BaseComment $comment ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to attach additional content to the author panel
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return string
|
||||
*/
|
||||
public function authorPanel( BaseComment $comment ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* returns additional menu items for the comment menu
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return array<string,MenuItem>
|
||||
*/
|
||||
public function menuItems( BaseComment $comment ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add elements to the comment form
|
||||
*
|
||||
* @param BaseComment|null $comment
|
||||
* @param BaseItem $item
|
||||
* @return array<string,FormAbstract>
|
||||
*/
|
||||
public function formElements( ?BaseComment $comment, BaseItem $item ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered after the comment form is saved
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @param array $values
|
||||
* @return void
|
||||
*/
|
||||
public function formPostSave( BaseComment $comment, array $values ): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -26,141 +26,4 @@ class {class} extends UIItem
|
||||
* @brief Class to extend
|
||||
*/
|
||||
public static ?string $class = '{item}';
|
||||
|
||||
/**
|
||||
* Can be used to add additional css classes to the item
|
||||
*
|
||||
* @param BaseItem $item
|
||||
* @return string
|
||||
*/
|
||||
public function css( BaseItem $item ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to add additional data attributes to the item
|
||||
*
|
||||
* @param BaseItem $item
|
||||
* @return string
|
||||
*/
|
||||
public function dataAttributes( BaseItem $item ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* returns additional menu items for the moderation menu
|
||||
*
|
||||
* @param BaseItem $item
|
||||
* @return array
|
||||
*/
|
||||
public function menuItems( BaseItem $item ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns additional badge icons to display in the header
|
||||
*
|
||||
* @param BaseItem $item
|
||||
* @return array<Icon>
|
||||
*/
|
||||
public function badges( BaseItem $item ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add elements to the item form.
|
||||
* This method returns all elements that will be added.
|
||||
* By default, all elements will be added in order at the end of the form.
|
||||
* To specify placement within the form, @see FormAbstract::setPosition().
|
||||
*
|
||||
* @param BaseItem|null $item
|
||||
* @param Model|null $container
|
||||
* @return array<string,FormAbstract>
|
||||
*/
|
||||
public function formElements( ?BaseItem $item, ?Model $container ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after the Item form is saved
|
||||
*
|
||||
* @param BaseItem $item
|
||||
* @param array $values
|
||||
* @return void
|
||||
*/
|
||||
public function formPostSave( BaseItem $item, array $values ): void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Display content in the contextual sidebar
|
||||
*
|
||||
* @param BaseItem $item
|
||||
* @return string
|
||||
*/
|
||||
public function sidebar( BaseItem $item ) : string
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Add custom sort options to the content table for this class
|
||||
* @note $item will ALWAYS be null.
|
||||
*
|
||||
* @param BaseItem|null $item
|
||||
* @param Content $table
|
||||
* @return array
|
||||
*/
|
||||
public function contentTableSortOptions( ?BaseItem $item, Content $table ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the sort direction for the selected sort option,
|
||||
* or NULL to use the default parent method.
|
||||
*
|
||||
* @note $item will ALWAYS be null.
|
||||
*
|
||||
* @param BaseItem|null $item
|
||||
* @param Content $table
|
||||
* @param string $sortBy
|
||||
* @return string|null
|
||||
*/
|
||||
public function contentTableSortDirection( ?BaseItem $item, Content $table, string $sortBy ) : string|null
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add custom filters to the content table for this class
|
||||
* @note $item will ALWAYS be null.
|
||||
*
|
||||
* @param BaseItem|null $item
|
||||
* @param Content $table
|
||||
* @return array
|
||||
*/
|
||||
public function contentTableFilters( ?BaseItem $item, Content $table ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add custom conditions to the where clause for a content table.
|
||||
* @note $item will ALWAYS be null.
|
||||
*
|
||||
* @param BaseItem|null $item
|
||||
* @param Content $table
|
||||
* @return array
|
||||
*/
|
||||
public function contentTableWhere( ?BaseItem $item, Content $table ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -24,86 +24,4 @@ class {class} extends UINode
|
||||
* @brief Class to extend
|
||||
*/
|
||||
public static ?string $class = '{node}';
|
||||
|
||||
/**
|
||||
* Can be used to add additional css classes to the node
|
||||
*
|
||||
* @param Model $node
|
||||
* @return array
|
||||
*/
|
||||
public function css( Model $node ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to add additional data attributes to the node
|
||||
*
|
||||
* @param Model $node
|
||||
* @return string
|
||||
*/
|
||||
public function dataAttributes( Model $node ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to add buttons to the ACP tree row
|
||||
* and to the view page in the ACP
|
||||
*
|
||||
* @param Model $node
|
||||
* @return array
|
||||
*/
|
||||
public function rowButtons( Model $node ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns additional HTML to be displayed in the ACP tree row
|
||||
*
|
||||
* @param Model $node
|
||||
* @return string
|
||||
*/
|
||||
public function rowHtml( Model $node ) : string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a badge to be displayed in the ACP tree row
|
||||
*
|
||||
* @param Model $node
|
||||
* @return null|array Null for no badge, or an array of badge data (0 => CSS class type, 1 => language string, 2 => optional raw HTML to show instead of language string)
|
||||
*/
|
||||
public function rowBadge( Model $node ) : array|null
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add elements to the Node form
|
||||
* This method returns all elements that will be added.
|
||||
* By default, all elements will be added in order at the end of the form.
|
||||
* To specify placement within the form, @see FormAbstract::setPosition().
|
||||
*
|
||||
* @param Model $node
|
||||
* @return array<string,FormAbstract>
|
||||
*/
|
||||
public function formElements( Model $node ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Called after the Node form is saved
|
||||
*
|
||||
* @param Model $node
|
||||
* @param array $values
|
||||
* @return void
|
||||
*/
|
||||
public function formPostSave( Model $node, array $values ): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -26,72 +26,4 @@ class {class} extends UIReview
|
||||
* @brief Class to extend
|
||||
*/
|
||||
public static ?string $class = '{review}';
|
||||
|
||||
/**
|
||||
* Can be used to add additional css classes to the comment
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return string
|
||||
*/
|
||||
public function css( BaseComment $comment ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to add additional data attributes to the comment
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return string
|
||||
*/
|
||||
public function dataAttributes( BaseComment $comment ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Can be used to attach additional content to the author panel
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return string
|
||||
*/
|
||||
public function authorPanel( BaseComment $comment ): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* returns additional menu items for the comment menu
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @return array<string,MenuItem>
|
||||
*/
|
||||
public function menuItems( BaseComment $comment ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Add elements to the comment form
|
||||
*
|
||||
* @param BaseComment|null $comment
|
||||
* @param BaseItem $item
|
||||
* @return array<string,FormAbstract>
|
||||
*/
|
||||
public function formElements( ?BaseComment $comment, BaseItem $item ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Triggered after the comment form is saved
|
||||
*
|
||||
* @param BaseComment $comment
|
||||
* @param array $values
|
||||
* @return void
|
||||
*/
|
||||
public function formPostSave( BaseComment $comment, array $values ): void
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -27,33 +27,5 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends UninstallAbstract
|
||||
{
|
||||
/**
|
||||
* Code to execute before the application has been uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @return void
|
||||
*/
|
||||
public function preUninstall( string $application ) : void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to execute after the application has been uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @return void
|
||||
*/
|
||||
public function postUninstall( string $application ) : void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to execute when other applications or plugins are uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @return void
|
||||
*/
|
||||
public function onOtherUninstall( string $application ) : void
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -20,58 +20,5 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
*/
|
||||
class {class} extends MenuExtension
|
||||
{
|
||||
/**
|
||||
* Used to add additional links to the user account menu
|
||||
*
|
||||
* @param string $position ( can be content, settings, logout )
|
||||
* @return array<MenuItem>
|
||||
*/
|
||||
public function accountMenu( string $position = 'content' ): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to add items to the mobile navigation Menu
|
||||
*
|
||||
* @param string $position (can be content, settings, logout)
|
||||
* @return array<MenuItem>
|
||||
*/
|
||||
public function mobileMenu( string $position = 'content' ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to add additional content to userbar
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function userNav(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to add content to the mobile navigation header
|
||||
*
|
||||
* @param string $position Where the code will be inserted (header/footer)
|
||||
* @param string $iconLocation Where the main icons are currently located (header/footer)
|
||||
* @return string
|
||||
*/
|
||||
public function mobileNav( string $position, string $iconLocation = 'footer' ) : string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to add items to the user profile menu
|
||||
*
|
||||
* @param MemberClass $member Member whose profile is being viewed
|
||||
* @return array<MenuItem>
|
||||
*/
|
||||
public function editProfileMenu( MemberClass $member ) : array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user