diff --git a/src/Controller/UserPanel.php b/src/Controller/UserPanel.php index 46753f93d8..46fe457fde 100644 --- a/src/Controller/UserPanel.php +++ b/src/Controller/UserPanel.php @@ -187,6 +187,9 @@ class UserPanel extends Controller return $form; } + /** + * Controller for defining the ordering of a users's languages + */ public function sortLanguages(Request $request) { $user = Common::ensureLoggedIn(); diff --git a/src/Core/Cache.php b/src/Core/Cache.php index c0aaf59191..cf94d1de8a 100644 --- a/src/Core/Cache.php +++ b/src/Core/Cache.php @@ -320,6 +320,11 @@ abstract class Cache } } + /** + * Fetch the value(s) for key $key in the hashmap identified by + * $map_key. If not found, use $calculate_map to calculate the + * _entire_ hashmap (not just those in $key) + */ public static function getHashMapKey(string $map_key, string|array $key, callable $calculate_map, string $pool = 'default') { if (isset(self::$redis[$pool])) { diff --git a/src/Util/Form/FormFields.php b/src/Util/Form/FormFields.php index 60bdba6849..2413046afd 100644 --- a/src/Util/Form/FormFields.php +++ b/src/Util/Form/FormFields.php @@ -16,6 +16,9 @@ use Symfony\Component\Validator\Constraints\NotBlank; abstract class FormFields { + /** + * Create a form field for asking for a new password twice (ensuring they're the same) + */ public static function repeated_password(array $options = []): array { $constraints = ($options['required'] ?? true) @@ -53,6 +56,8 @@ abstract class FormFields } /** + * Create a form field for asking for an existing password + * * @codeCoverageIgnore */ public static function password(array $options = []): array @@ -72,6 +77,9 @@ abstract class FormFields ]; } + /** + * Create a from field for `select`ing a language for $actor, in reply or related to $context_actor + */ public static function language(Actor $actor, ?Actor $context_actor, string $label, ?string $help = null, bool $multiple = false, bool $required = true, ?bool $use_short_display = null): array { [$language_choices, $preferred_language_choices] = Language::getSortedLanguageChoices($actor, $context_actor, use_short_display: $use_short_display);