From 0a39d8f5120cd13a8849c837cd78eb6ef34542d3 Mon Sep 17 00:00:00 2001 From: Awilum Date: Tue, 2 Jun 2020 23:54:26 +0300 Subject: [PATCH] feat(media): Media API add new dependencies #428 --- src/flextype/dependencies.php | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/flextype/dependencies.php b/src/flextype/dependencies.php index c193345a..851bf5a2 100644 --- a/src/flextype/dependencies.php +++ b/src/flextype/dependencies.php @@ -196,8 +196,32 @@ $flextype['entries'] = static function ($container) { return new Entries($container); }; -$flextype['media'] = static function ($container) use ($flextype, $app) { - return new Media($flextype, $app); +/** + * Add media files service to Flextype container + */ +$flextype['media_files'] = static function ($container) use ($flextype, $app) { + return new MediaFiles($flextype, $app); +}; + +/** + * Add media folders service to Flextype container + */ +$flextype['media_folders'] = static function ($container) use ($flextype, $app) { + return new MediaFolders($flextype, $app); +}; + +/** + * Add media files meta service to Flextype container + */ +$flextype['media_files_meta'] = static function ($container) use ($flextype, $app) { + return new MediaFilesMeta($flextype, $app); +}; + +/** + * Add media folders meta service to Flextype container + */ +$flextype['media_folders_meta'] = static function ($container) use ($flextype, $app) { + return new MediaFoldersMeta($flextype, $app); }; /**