function LinkitPluginFile::buildGroup in Linkit 7.2
Adds the file scheme to the group if "group_by_scheme" is activated.
Overrides LinkitPluginEntity::buildGroup
File
- plugins/
linkit_plugins/ linkit-plugin-file.class.php, line 71 - Define Linkit file plugin class.
Class
- LinkitPluginFile
- @file Define Linkit file plugin class.
Code
function buildGroup($entity) {
// The the standard group name.
$group = parent::buildGroup($entity);
// Add the scheme.
if ($this->conf['group_by_scheme']) {
// Get all stream wrappers.
$stream_wrapper = file_get_stream_wrappers();
$group .= ' · ' . $stream_wrapper[file_uri_scheme($entity->uri)]['name'];
}
return $group;
}