madbob/GASdottoNG

View on GitHub
code/app/View/Icons/Attachment.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

namespace App\View\Icons;

class Attachment extends IconsMap
{
    public static function commons($user)
    {
        return [
            'image' => (object) [
                'test' => function ($obj) {
                    return $obj->isImage();
                },
                'text' => _i('Immagine'),
            ],
            'shield-x' => (object) [
                'test' => function ($obj) {
                    return ($obj->users()->count() != 0);
                },
                'text' => _i('Accesso limitato'),
            ],
        ];
    }
}