nattreid/reference-service

ReferenceService for Nette Framework

1.2.2 2017-12-05 08:05 UTC

This package is auto-updated.

Last update: 2024-12-08 23:47:57 UTC


README

Nastavení v config.neon

extensions:
    references: NAttreid\ReferenceService\DI\ReferenceServiceExtension

dostupné nastavení

references:
    classes:
        - App\Services\ReferenceService

Příklad

class ReferenceService extends Service {

    /**
     * @return array[key => class]
     */
    public static function getEntities()
    {
        return [
            1 => Test::class,
            2 => Test2::class,
            3 => Test3::class,
            4 => Test4::class,
        ];
    }
}
class Test extends Entity {

}