2 require_once(
"./Services/Style/System/classes/Icons/class.ilSystemStyleIcon.php");
3 require_once(
"./Services/Style/System/classes/Exceptions/class.ilSystemStyleIconException.php");
69 }
else if($b->
getType() ==
"svg"){
84 protected function xRead($src =
"",$rel_path=
""){
88 foreach (scandir($src) as
$file) {
89 $src_file = rtrim($src,
'/') .
'/' .
$file;
90 if (!is_readable($src_file)) {
93 if (substr($file, 0, 1) !=
".") {
94 if (is_dir($src_file)) {
95 self::xRead($src_file,$rel_path.
"/".$file);
97 $info =
new SplFileInfo($src_file);
98 $extension =
$info->getExtension();
99 if($extension ==
"gif" || $extension ==
"svg" || $extension ==
"png"){
114 foreach($this->
getIcons() as $icon){
115 $icon->changeColors($color_changes);
125 $this->icons[] = $icon;
144 foreach($this->icons as $icon){
145 if($icon->getName() == $name){
160 foreach($this->
getIcons() as $icon){
161 $folders[dirname($icon->getPath())][] = $icon;
166 foreach($folders as $id => $folder){
167 ksort($folders[$id]);
201 if(!$this->color_set){
212 foreach($this->
getIcons() as $icon){
213 $this->color_set->mergeColorSet($icon->getColorSet());
225 foreach($this->
getIcons() as $icon){
226 if($icon->usesColor($color_id)){
243 $usage_string .= rtrim($icon->getName(),
".svg").
"; ";
245 return $usage_string;
Class for advanced editing exception handling in ILIAS.
sortIcons()
Sorts the Icons by name and type.
getUsagesOfColorAsString($color_id)
Gets the usages of a color as string.
xRead($src="", $rel_path="")
addIcon(ilSystemStyleIcon $icon)
Adds an icon to the folders abstraction.
extractColorSet()
Gets the color sets of all icons an merges them into one.
getIconsSortedByFolder()
Sorts all icons by their occurrence in folders.
getIcons()
Gets an Icon from the folders abstraction.
Abstracts an Icon and the necessary actions to get all colors out of an svg Icon. ...
getUsagesOfColor($color_id)
Gets the usages of a certain color.
const IMAGES_FOLDER_DOES_NOT_EXIST
Class for advanced editing exception handling in ILIAS.
const FILE_OPENING_FAILED
changeIconColors(array $color_changes)
Changes a set of colors in all icons contained in the folder.
Create styles array
The data for the language used.
Abstracts a folder containing a set of icons.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
const ICON_DOES_NOT_EXIST
__construct($path)
ilSystemStyleIconFolder constructor.
read()
Reads the folder recursively and sorts the icons by name and type.