diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-01-29 21:15:38 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-01-29 21:15:38 +0100 |
commit | c3014fb7be5c54ac9d1325f33f6fe0a2624161a8 (patch) | |
tree | 1583b667316e4ac6fe2e2b5bedcc190de7ff46c2 /app/class/Colors.php | |
parent | b28f1a4a516f93044c632b254670dd21f52e625c (diff) | |
download | wcms-c3014fb7be5c54ac9d1325f33f6fe0a2624161a8.tar.gz wcms-c3014fb7be5c54ac9d1325f33f6fe0a2624161a8.zip |
new feature : home>display>tags colors
Diffstat (limited to 'app/class/Colors.php')
-rw-r--r-- | app/class/Colors.php | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/app/class/Colors.php b/app/class/Colors.php index ce37d62..bf11229 100644 --- a/app/class/Colors.php +++ b/app/class/Colors.php @@ -2,7 +2,7 @@ namespace Wcms; -class Colors +class Colors extends Item { protected $file = MODEL::CSS_DIR . 'tagcolors.css'; @@ -84,13 +84,42 @@ class Colors } } - public function htmlcolorpicker(array $csstagcolor): string + public function htmlcolorpicker(): string { $html = '<ul>'; - foreach ($csstagcolor as $tag => $color) { - $html .= PHP_EOL . '<li><input type="color" name="colors[' . $tag . ']" value="' . $color . '"></li>'; + foreach ($this->tagcolor as $tag => $color) { + $html .= PHP_EOL . '<li><input type="color" name="tagcolor[' . $tag . ']" value="' . $color . '" id="color_' . $tag . '"><label for="color_' . $tag . '" >' . $tag . '</label></li>'; } $html .= PHP_EOL . '</ul>'; return $html; } + + + // ______________________ G E T _________________________ + + public function rawcss() + { + return $this->rawcss; + } + + public function tagcolor() + { + return $this->tagcolor; + } + + // _______________________ S E T _________________________ + + public function setrawcss($rawcss) + { + if(is_string($rawcss)) { + $this->rawcss = $rawcss; + } + } + + public function settagcolor($tagcolor) + { + if(is_array($tagcolor)) { + $this->tagcolor = $tagcolor; + } + } } |