[TOOLS][DOCS] Add missing doc blocks

This commit is contained in:
Hugo Sales 2021-11-25 23:16:04 +00:00
parent b1262919da
commit edf1b30e89
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
3 changed files with 16 additions and 0 deletions

View File

@ -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();

View File

@ -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])) {

View File

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