Skip to content

Commit 8f7a9bf

Browse files
committed
Add Remix Icon
1 parent 60ac6b9 commit 8f7a9bf

3 files changed

Lines changed: 42 additions & 17 deletions

File tree

FieldtypeFontIconPicker.module

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class FieldtypeFontIconPicker extends Fieldtype implements Module, ConfigurableM
2424
return array(
2525
'title' => 'Icon Picker',
2626
'summary' => __('Allow you to use icon picker input field.'),
27-
'version' => 202,
27+
'version' => 203,
2828
'author' => 'İskender TOTOĞLU | @ukyo(community), @trk (Github), http://altivebir.com.tr',
2929
'icon' => 'hand-pointer-o',
3030
'href' => 'https://github.com/trk/FieldtypeFontIconPicker',
@@ -40,7 +40,7 @@ class FieldtypeFontIconPicker extends Fieldtype implements Module, ConfigurableM
4040
*
4141
* @param string $path
4242
* @param string $filter
43-
*
43+
*
4444
* @return array
4545
*/
4646
protected function finder(string $path, $filter = "configs/IconPicker.")
@@ -58,7 +58,7 @@ class FieldtypeFontIconPicker extends Fieldtype implements Module, ConfigurableM
5858
$paths[] = $path;
5959
}
6060
}
61-
61+
6262
return $paths;
6363
}
6464

@@ -72,17 +72,17 @@ class FieldtypeFontIconPicker extends Fieldtype implements Module, ConfigurableM
7272
$resources = array();
7373

7474
$paths = array_merge($this->finder($this->config->paths->siteModules), $this->finder($this->config->paths->templates . "configs" . DIRECTORY_SEPARATOR));
75-
75+
7676
foreach ($paths as $file) {
7777

7878
$dirname = dirname(dirname($file));
7979
$base = strtolower(str_replace([dirname(dirname(dirname($file))), "/", "\\"], "", $dirname));
8080
$filename = str_replace([dirname($file), "/", "\\", "IconPicker.", ".php"], "", $file);
81-
81+
8282
$source = include $file;
83-
83+
8484
if (is_array($source)) {
85-
85+
8686
$name = isset($source["name"]) ? $source["name"] : $filename;
8787
$title = isset($source["title"]) ? $source["title"] : $name;
8888
$version = isset($source["version"]) ? $source["version"] : "";
@@ -91,7 +91,7 @@ class FieldtypeFontIconPicker extends Fieldtype implements Module, ConfigurableM
9191
$categorized = isset($source["categorized"]) ? $source["categorized"] : false;
9292
$attributes = isset($source["attributes"]) ? $source["attributes"] : array();
9393

94-
94+
9595
$resources["{$base}.{$name}"] = array(
9696
"base" => $base,
9797
"filename" => $filename,
@@ -121,14 +121,14 @@ class FieldtypeFontIconPicker extends Fieldtype implements Module, ConfigurableM
121121

122122
return $inputField;
123123
}
124-
124+
125125
/**
126126
* @inheritDoc
127127
*
128128
* @param Page $page
129129
* @param Field $field
130130
* @param string $value
131-
*
131+
*
132132
* @return string
133133
*/
134134
public function sanitizeValue(Page $page, Field $field, $value)
@@ -140,7 +140,7 @@ class FieldtypeFontIconPicker extends Fieldtype implements Module, ConfigurableM
140140
if($prefix) {
141141
$value = str_replace($prefix, '', $value);
142142
}
143-
143+
144144
return $value;
145145
}
146146

@@ -162,12 +162,12 @@ class FieldtypeFontIconPicker extends Fieldtype implements Module, ConfigurableM
162162
* Return an InputfieldWrapper of Inputfields used to configure the class
163163
*
164164
* @param array $data Array of config values indexed by field name
165-
*
165+
*
166166
* @return InputfieldsWrapper
167167
*
168168
*/
169169
public function getModuleConfigInputfields(array $data) {
170-
170+
171171
$wrapper = new InputfieldWrapper();
172172

173173
/**
@@ -180,7 +180,7 @@ class FieldtypeFontIconPicker extends Fieldtype implements Module, ConfigurableM
180180
$checkbox->attr('checked', $this->useGlob ? 'checked' : '');
181181

182182
$wrapper->add($checkbox);
183-
183+
184184
return $wrapper;
185185
}
186186
}

configs/IconPicker.remixicon.php

Lines changed: 24 additions & 0 deletions
Large diffs are not rendered by default.

readme.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# FieldtypeFontIconPicker
22

3-
> This field-type allow to you easily pick icons from input-field. This module using [jQuery fontIconPicker](https://github.com/fontIconPicker/fontIconPicker) as icon selector. You can see supported icon libraries below. If you need to use custom fonts you can check below example.
3+
> This field-type allow to you easily pick icons from input-field. This module using [jQuery fontIconPicker](https://github.com/fontIconPicker/fontIconPicker) as icon selector. You can see supported icon libraries below. If you need to use custom fonts you can check below example.
44
55
### Supported Icon Libraries
66
- [FontAwesome 4.7.0](https://fontawesome.com/v4.7.0/icons/)
77
- [Uikit 3.0.34](https://getuikit.com/docs/icon#library)
88
- [IonicIcons 2.0.1](http://ionicons.com/)
9+
- [Remix Icon 2.5.0](https://remixicon.com/)
910

1011
### [Cahangelog](https://github.com/trk/FieldtypeFontIconPicker/blob/master/CHANGELOG.md)
1112

@@ -17,7 +18,7 @@
1718

1819
### Module will search `site/modules/**/configs/IconPicker.*.php` and `site/templates/IconPicker.*.php` paths for `FieldtypeFontIconPicker` config files.
1920

20-
All config files need to return a `PHP ARRAY` like examples.
21+
All config files need to return a `PHP ARRAY` like examples.
2122

2223
---
2324

@@ -130,4 +131,4 @@ echo MarkupFontIconPicker::render($page->YourIconField, [
130131
![Library Select](https://raw.githubusercontent.com/trk/FieldtypeFontIconPicker/master/screenshots/search-support.png)
131132

132133
## Category support
133-
![Library Select](https://raw.githubusercontent.com/trk/FieldtypeFontIconPicker/master/screenshots/category-support.png)
134+
![Library Select](https://raw.githubusercontent.com/trk/FieldtypeFontIconPicker/master/screenshots/category-support.png)

0 commit comments

Comments
 (0)