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

Project information

Releases