Spatie\SlashCommand\Handlers\Help::displayListOfAllCommands PHP Метод

displayListOfAllCommands() защищенный Метод

Show a list of all available handlers.
protected displayListOfAllCommands ( Collection $handlers ) : Response
$handlers Illuminate\Support\Collection
Результат Spatie\SlashCommand\Response
    protected function displayListOfAllCommands(Collection $handlers) : Response
    {
        $attachmentFields = $handlers->sort(function (SignatureHandler $handlerA, SignatureHandler $handlerB) {
            return strcmp($handlerA->getFullCommand(), $handlerB->getFullCommand());
        })->map(function (SignatureHandler $handler) {
            return AttachmentField::create($handler->getFullCommand(), $handler->getDescription());
        })->all();
        return $this->respondToSlack('Available commands:')->withAttachment(Attachment::create()->setColor('good')->setFields($attachmentFields));
    }