Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This project is not covered by Drupal’s security advisory policy.
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
Supporting organizations:
Project information
- Module categories: Media
- 8 sites report using this module
- Created by OlivierG on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
1.0.0-beta2
released 17 August 2023
Works with Drupal: ^9 || ^10
✓ Recommended by the project’s maintainer.
Install: