private function _formatAuthorOptions(array $authors): array
    {
        $options = [];

        foreach ($authors as $author) {
            $authorLabel = $author->username;

            if ($fullName = $author->getFullName()) {
                $authorLabel .= ' ('.$fullName.')';
            }

            $options[] = ['label' => $authorLabel, 'value' => $author->uid];
        }

        return $options;
    }
private function _formatAuthorOptions(array $authors): array
    {
        $options = [];

        foreach ($authors as $author) {
            $authorLabel = $author->username;

            if ($fullName = $author->getFullName()) {
                $authorLabel .= ' ('.$fullName.')';
            }

            $options[] = ['label' => $authorLabel, 'value' => $author->uid];
        }

        return $options;
    }
private function _formatAuthorOptions ( array $ authors ) : array { $ options = [ ] ; foreach ( $ authors as $ author ) { $ authorLabel = $ author -> username ; if ( $ fullName = $ author -> getFullName ( ) ) { $ authorLabel .= ' (' . $ fullName . ')' ; } $ options [ ] = [ 'label' => $ authorLabel , 'value' => $ author -> uid ] ; } return $ options ; }
Formats the given list of authors for a select input.

@param User[] $authors
@return array
Formats the given list of authors for a select input .