public static function Imce::processUserFolders in IMCE 8
Same name and namespace in other branches
- 8.2 src/Imce.php \Drupal\imce\Imce::processUserFolders()
Processes user folders.
1 call to Imce::processUserFolders()
- Imce::processUserConf in src/
Imce.php - Processes raw profile configuration of a user.
File
- src/
Imce.php, line 120
Class
- Imce
- Imce container class for helper methods.
Namespace
Drupal\imceCode
public static function processUserFolders(array $folders, AccountProxyInterface $user) {
$ret = [];
$token_service = \Drupal::token();
$meta = new BubbleableMetadata();
$token_data = [
'user' => $user,
];
foreach ($folders as $folder) {
$path = $token_service
->replace($folder['path'], $token_data, [], $meta);
if (static::regularPath($path)) {
$ret[$path] = $folder;
unset($ret[$path]['path']);
}
}
return $ret;
}