Overview
This module add the possibility to create Dynamic paths in Imce profiles by creating imce_dfp plugins.
How to setup in Imce configuration
- Go to Imce configuration /admin/config/media/imce
- Create a profile
- Set the plugin name you created in the profile folder path like this
dfp_plugin: my_plugin
How to create a plugin
- Create a module
- Create a plugin in the folder my_module/src/Plugin/ImceDfp
- See, as example, a plugin code below :
<?php
namespace Drupal\my_module\Plugin\ImceDfp;
use Drupal\Core\Plugin\PluginBase;
use Drupal\imce_dfp\Service\ImceDfpPluginInterface;
/**
* My plugin example code.
*
* @ImceDfp (
* id = "my_plugin",
* title = @Translation("My plugin"),
* description = @Translation("My plugin example code."),
* )
*/
class MyPlugin extends PluginBase implements ImceDfpPluginInterface {
/**
* {@inheritdoc}
*/
public function getPaths($profile_id, $conf): array {
$paths = [];
$paths[] = 'my/new/folder/path';
return $paths;
}
}
Dependencies
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the Imce ecosystem
Most installed first
Activity
Releases
| Version | Type | Core | Release date | |
|---|---|---|---|---|
| 1.0.0 | Stable | Aug 22, 2024 | ||
| 1.0.0-beta2 | Pre-release | Aug 17, 2023 |