Version 5.0.0 beta 5

This commit is contained in:
Neo committed 2025-12-19 17:04:22 -08:00
1 parent 2f24f9de48
commit 57d9db6ce2
218 files changed
+5331 -7416

No files matched your search

@@ -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;
}
}