-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[4.2] Convert the checkfiles plugin to service provider #38072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
ffc9a67
redo
laoneo 134e9cd
Merge branch '4.2-dev' into j4/plugins/checkfiles
laoneo 06372ed
Update plugins/task/checkfiles/checkfiles.xml
laoneo f461767
Update plugins/task/checkfiles/src/Extension/Checkfiles.php
laoneo c7b6375
Update tests/Unit/Plugin/Task/Checkfiles/Extension/CheckfilesPluginTe…
laoneo 5ea0370
Update tests/Unit/Plugin/Task/Checkfiles/Extension/CheckfilesPluginTe…
laoneo 7c06c04
Update tests/Unit/Plugin/Task/Checkfiles/Extension/CheckfilesPluginTe…
laoneo a5bf970
Merge branch '4.2-dev' into j4/plugins/checkfiles
laoneo c1c9b84
Merge branch '4.2-dev' into j4/plugins/checkfiles
laoneo 230c3bb
Update tests/Unit/Plugin/Task/Checkfiles/Extension/CheckfilesPluginTe…
laoneo 6200d00
Update tests/Unit/Plugin/Task/Checkfiles/Extension/CheckfilesPluginTe…
laoneo 2ba1beb
Update tests/Unit/Plugin/Task/Checkfiles/Extension/CheckfilesPluginTe…
laoneo 2c8ca31
Update tests/Unit/Plugin/Task/Checkfiles/Extension/CheckfilesPluginTe…
laoneo 399e140
Update tests/Unit/Plugin/Task/Checkfiles/Extension/CheckfilesPluginTe…
laoneo 7d1a534
Update tests/Unit/Plugin/Task/Checkfiles/Extension/CheckfilesPluginTe…
laoneo f942d7f
Update tests/Unit/Plugin/Task/Checkfiles/Extension/CheckfilesPluginTe…
laoneo 7dab748
Update tests/Unit/Plugin/Task/Checkfiles/Extension/CheckfilesPluginTe…
laoneo c0bc995
Merge branch '4.2-dev' into j4/plugins/checkfiles
laoneo 4c08de9
Merge branch '4.2-dev' into j4/plugins/checkfiles
laoneo 3479ac6
Merge branch '4.2-dev' into j4/plugins/checkfiles
roland-d 9acc2a8
Merge branch '4.2-dev' into j4/plugins/checkfiles
laoneo 81c0c3b
translate
laoneo 2feadf2
cs
laoneo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * @package Joomla.Plugin | ||
| * @subpackage Task.CheckFiles | ||
| * | ||
| * @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org> | ||
| * @license GNU General Public License version 2 or later; see LICENSE.txt | ||
| */ | ||
|
|
||
| defined('_JEXEC') or die; | ||
|
|
||
| use Joomla\CMS\Extension\PluginInterface; | ||
| use Joomla\CMS\Factory; | ||
| use Joomla\CMS\Plugin\PluginHelper; | ||
| use Joomla\DI\Container; | ||
| use Joomla\DI\ServiceProviderInterface; | ||
| use Joomla\Event\DispatcherInterface; | ||
| use Joomla\Plugin\Task\Checkfiles\Extension\Checkfiles; | ||
|
|
||
| return new class implements ServiceProviderInterface | ||
| { | ||
| /** | ||
| * Registers the service provider with a DI container. | ||
| * | ||
| * @param Container $container The DI container. | ||
| * | ||
| * @return void | ||
| * | ||
| * @since __DEPLOY_VERSION__ | ||
| */ | ||
| public function register(Container $container) | ||
| { | ||
| $container->set( | ||
| PluginInterface::class, | ||
| function (Container $container) { | ||
| $plugin = new Checkfiles( | ||
| $container->get(DispatcherInterface::class), | ||
| (array) PluginHelper::getPlugin('task', 'checkfiles'), | ||
| JPATH_ROOT . '/images/' | ||
| ); | ||
| $plugin->setApplication(Factory::getApplication()); | ||
|
|
||
| return $plugin; | ||
| } | ||
| ); | ||
| } | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.