protected function IconsetFinderService::setInstallDirs in Social Media Links Block and Field 8.2
Set the directores where iconsets should be saved.
This differs to the "searchDirs" that if a icon should be printed, we are searching for the iconset path in all "searchDirs". But the user should only install new iconsets in the directories, that are defined in "installDirs".
1 call to IconsetFinderService::setInstallDirs()
- IconsetFinderService::getInstallDirs in src/
IconsetFinderService.php - Get the directories where iconsets should be saved.
File
- src/
IconsetFinderService.php, line 116
Class
- IconsetFinderService
- Service class to detect the files of the iconsets/ in various directories.
Namespace
Drupal\social_media_linksCode
protected function setInstallDirs() {
$searchdirs = $this->searchDirs;
// Remove the core and social_media_links module directory from the possible
// target directories for installation.
foreach ($searchdirs as $key => $dir) {
if (preg_match("/core|social_media_links/", $dir)) {
unset($searchdirs[$key]);
}
}
$this->installDirs = $searchdirs;
}