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,17 +11,24 @@
|
||||
|
||||
namespace IPS\{app}\extensions\core\ProfileSteps;
|
||||
|
||||
use IPS\Extensions\ProfileStepsAbstract;
|
||||
use IPS\Helpers\Form;
|
||||
use IPS\Http\Url;
|
||||
use IPS\Member as MemberClass;
|
||||
use IPS\Member\ProfileStep;
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Profile Completion Extension
|
||||
*/
|
||||
class _{class}
|
||||
class {class} extends ProfileStepsAbstract
|
||||
{
|
||||
/**
|
||||
* Available Actions to complete steps
|
||||
@@ -47,9 +54,9 @@ class _{class}
|
||||
* Can the actions have multiple choices?
|
||||
*
|
||||
* @param string $action Action key (basic_profile, etc)
|
||||
* @return boolean
|
||||
* @return bool|null
|
||||
*/
|
||||
public static function actionMultipleChoice( $action ): bool
|
||||
public static function actionMultipleChoice( string $action ): ?bool
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -57,11 +64,11 @@ class _{class}
|
||||
/**
|
||||
* Has a specific step been completed?
|
||||
*
|
||||
* @param \IPS\Member\ProfileStep $step The step to check
|
||||
* @param \IPS\Member|NULL $member The member to check, or NULL for currently logged in
|
||||
* @param ProfileStep $step The step to check
|
||||
* @param MemberClass|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 ): bool
|
||||
public function completed( ProfileStep $step, ?MemberClass $member = NULL ): bool
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -81,22 +88,22 @@ class _{class}
|
||||
* Action URL
|
||||
*
|
||||
* @param string $action The action
|
||||
* @param \IPS\Member|NULL $member The member, or NULL for currently logged in
|
||||
* @return \IPS\Http\Url
|
||||
* @param MemberClass|NULL $member The member, or NULL for currently logged in
|
||||
* @return Url|null
|
||||
*/
|
||||
public function url( $action, \IPS\Member $member = NULL ): \IPS\Http\Url
|
||||
public function url( string $action, ?MemberClass $member = NULL ): ?Url
|
||||
{
|
||||
return \IPS\Http\Url::internal( '' );
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Post ACP Save
|
||||
*
|
||||
* @param \IPS\Member\ProfileStep $step The step
|
||||
* @param array $values Form Values
|
||||
* @param ProfileStep $step The step
|
||||
* @param array $values Form Values
|
||||
* @return void
|
||||
*/
|
||||
public function postAcpSave( \IPS\Member\ProfileStep $step, array $values )
|
||||
public function postAcpSave( ProfileStep $step, array $values ) : void
|
||||
{
|
||||
|
||||
}
|
||||
@@ -104,12 +111,12 @@ class _{class}
|
||||
/**
|
||||
* Format Form Values
|
||||
*
|
||||
* @param array $values The values from the form
|
||||
* @param \IPS\Member $member The member
|
||||
* @param \IPS\Helpers\Form $form The form
|
||||
* @param array $values The values from the form
|
||||
* @param MemberClass $member The member
|
||||
* @param Form $form The form
|
||||
* @return void
|
||||
*/
|
||||
public static function formatFormValues( $values, &$member, &$form )
|
||||
public static function formatFormValues( array $values, MemberClass $member, Form $form ) : void
|
||||
{
|
||||
|
||||
}
|
||||
@@ -117,10 +124,10 @@ class _{class}
|
||||
/**
|
||||
* Wizard Steps
|
||||
*
|
||||
* @param \IPS\Member $member Member or NULL for currently logged in member
|
||||
* @return array
|
||||
* @param MemberClass|null $member Member or NULL for currently logged in member
|
||||
* @return array|string
|
||||
*/
|
||||
public static function wizard( \IPS\Member $member = NULL ): array
|
||||
public static function wizard( ?MemberClass $member = NULL ): array|string
|
||||
{
|
||||
return array( );
|
||||
}
|
||||
@@ -128,10 +135,10 @@ class _{class}
|
||||
/**
|
||||
* Post Delete
|
||||
*
|
||||
* @param \IPS\Member\ProfileStep The step
|
||||
* @param ProfileStep $step The step
|
||||
* @return void
|
||||
*/
|
||||
public function onDelete( \IPS\Member\ProfileStep $step )
|
||||
public function onDelete( ProfileStep $step ) : void
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user