diff --git a/composer.json b/composer.json index bd0d6d7..c132a54 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "anomaly/files-module", + "name": "visiosoft/files-module", "type": "streams-addon", "description": "Powerful asset management made easy.", "keywords": [ diff --git a/resources/lang/ar/section.php b/resources/lang/ar/section.php new file mode 100644 index 0000000..d3e575d --- /dev/null +++ b/resources/lang/ar/section.php @@ -0,0 +1,11 @@ + ['title' => "Files"], + "disks" => ['title' => "Disk"], + "fields" => ['title' => "Fields"], + "folders" => ['title' => "Folders"], + "adapters" => ['title' => "Adapters"], + "assignments" => ['title' => "Assignments"], + +]; \ No newline at end of file diff --git a/resources/lang/de/section.php b/resources/lang/de/section.php new file mode 100644 index 0000000..d3e575d --- /dev/null +++ b/resources/lang/de/section.php @@ -0,0 +1,11 @@ + ['title' => "Files"], + "disks" => ['title' => "Disk"], + "fields" => ['title' => "Fields"], + "folders" => ['title' => "Folders"], + "adapters" => ['title' => "Adapters"], + "assignments" => ['title' => "Assignments"], + +]; \ No newline at end of file diff --git a/resources/lang/en/section.php b/resources/lang/en/section.php new file mode 100644 index 0000000..d3e575d --- /dev/null +++ b/resources/lang/en/section.php @@ -0,0 +1,11 @@ + ['title' => "Files"], + "disks" => ['title' => "Disk"], + "fields" => ['title' => "Fields"], + "folders" => ['title' => "Folders"], + "adapters" => ['title' => "Adapters"], + "assignments" => ['title' => "Assignments"], + +]; \ No newline at end of file diff --git a/resources/lang/fr/section.php b/resources/lang/fr/section.php new file mode 100644 index 0000000..d3e575d --- /dev/null +++ b/resources/lang/fr/section.php @@ -0,0 +1,11 @@ + ['title' => "Files"], + "disks" => ['title' => "Disk"], + "fields" => ['title' => "Fields"], + "folders" => ['title' => "Folders"], + "adapters" => ['title' => "Adapters"], + "assignments" => ['title' => "Assignments"], + +]; \ No newline at end of file diff --git a/resources/lang/hu/section.php b/resources/lang/hu/section.php new file mode 100644 index 0000000..d3e575d --- /dev/null +++ b/resources/lang/hu/section.php @@ -0,0 +1,11 @@ + ['title' => "Files"], + "disks" => ['title' => "Disk"], + "fields" => ['title' => "Fields"], + "folders" => ['title' => "Folders"], + "adapters" => ['title' => "Adapters"], + "assignments" => ['title' => "Assignments"], + +]; \ No newline at end of file diff --git a/resources/lang/it/section.php b/resources/lang/it/section.php new file mode 100644 index 0000000..d3e575d --- /dev/null +++ b/resources/lang/it/section.php @@ -0,0 +1,11 @@ + ['title' => "Files"], + "disks" => ['title' => "Disk"], + "fields" => ['title' => "Fields"], + "folders" => ['title' => "Folders"], + "adapters" => ['title' => "Adapters"], + "assignments" => ['title' => "Assignments"], + +]; \ No newline at end of file diff --git a/resources/lang/lt/section.php b/resources/lang/lt/section.php new file mode 100644 index 0000000..d3e575d --- /dev/null +++ b/resources/lang/lt/section.php @@ -0,0 +1,11 @@ + ['title' => "Files"], + "disks" => ['title' => "Disk"], + "fields" => ['title' => "Fields"], + "folders" => ['title' => "Folders"], + "adapters" => ['title' => "Adapters"], + "assignments" => ['title' => "Assignments"], + +]; \ No newline at end of file diff --git a/resources/lang/nl/section.php b/resources/lang/nl/section.php new file mode 100644 index 0000000..d3e575d --- /dev/null +++ b/resources/lang/nl/section.php @@ -0,0 +1,11 @@ + ['title' => "Files"], + "disks" => ['title' => "Disk"], + "fields" => ['title' => "Fields"], + "folders" => ['title' => "Folders"], + "adapters" => ['title' => "Adapters"], + "assignments" => ['title' => "Assignments"], + +]; \ No newline at end of file diff --git a/resources/lang/sv/section.php b/resources/lang/sv/section.php new file mode 100644 index 0000000..d3e575d --- /dev/null +++ b/resources/lang/sv/section.php @@ -0,0 +1,11 @@ + ['title' => "Files"], + "disks" => ['title' => "Disk"], + "fields" => ['title' => "Fields"], + "folders" => ['title' => "Folders"], + "adapters" => ['title' => "Adapters"], + "assignments" => ['title' => "Assignments"], + +]; \ No newline at end of file diff --git a/resources/lang/tr/section.php b/resources/lang/tr/section.php new file mode 100644 index 0000000..736e441 --- /dev/null +++ b/resources/lang/tr/section.php @@ -0,0 +1,11 @@ + ['title' => "Dosyalar"], + "disks" => ['title' => "Diskler"], + "fields" => ['title' => "Alanlar"], + "folders" => ['title' => "Klasörler"], + "adapters" => ['title' => "Adaptörleri"], + "assignments" => ['title' => "Ödevler"], + +]; \ No newline at end of file diff --git a/resources/lang/zh-cn/section.php b/resources/lang/zh-cn/section.php new file mode 100644 index 0000000..d3e575d --- /dev/null +++ b/resources/lang/zh-cn/section.php @@ -0,0 +1,11 @@ + ['title' => "Files"], + "disks" => ['title' => "Disk"], + "fields" => ['title' => "Fields"], + "folders" => ['title' => "Folders"], + "adapters" => ['title' => "Adapters"], + "assignments" => ['title' => "Assignments"], + +]; \ No newline at end of file diff --git a/resources/lang/zh-tw/section.php b/resources/lang/zh-tw/section.php new file mode 100644 index 0000000..d3e575d --- /dev/null +++ b/resources/lang/zh-tw/section.php @@ -0,0 +1,11 @@ + ['title' => "Files"], + "disks" => ['title' => "Disk"], + "fields" => ['title' => "Fields"], + "folders" => ['title' => "Folders"], + "adapters" => ['title' => "Adapters"], + "assignments" => ['title' => "Assignments"], + +]; \ No newline at end of file diff --git a/src/FilesModulePlugin.php b/src/FilesModulePlugin.php index 1581cb2..ad639b1 100644 --- a/src/FilesModulePlugin.php +++ b/src/FilesModulePlugin.php @@ -5,6 +5,7 @@ use Anomaly\FilesModule\Folder\Command\GetFolder; use Anomaly\Streams\Platform\Addon\Plugin\Plugin; use Anomaly\Streams\Platform\Support\Decorator; +use Twig\TwigFunction; /** * Class FilesModulePlugin @@ -24,19 +25,19 @@ class FilesModulePlugin extends Plugin public function getFunctions() { return [ - new \Twig_SimpleFunction( + new TwigFunction( 'max_upload_size', function () { return dispatch_sync(new GetMaxUploadSize()); } ), - new \Twig_SimpleFunction( + new TwigFunction( 'file', function ($identifier) { return (new Decorator())->decorate(dispatch_sync(new GetFile($identifier))); } ), - new \Twig_SimpleFunction( + new TwigFunction( 'folder', function ($identifier) { return (new Decorator())->decorate(dispatch_sync(new GetFolder($identifier)));