mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Fixed getFillColor
This commit is contained in:
parent
a06cc36713
commit
a96b2359ca
@ -1342,12 +1342,12 @@ class Item extends CachedModel
|
|||||||
$result['label_position'] = $label_position;
|
$result['label_position'] = $label_position;
|
||||||
}
|
}
|
||||||
|
|
||||||
$border_color = static::extractBorderColor($data);
|
$border_color = static::getBorderColor($data);
|
||||||
if ($border_color !== null) {
|
if ($border_color !== null) {
|
||||||
$result['border_color'] = $border_color;
|
$result['border_color'] = $border_color;
|
||||||
}
|
}
|
||||||
|
|
||||||
$fill_color = static::extractFillColor($data);
|
$fill_color = static::getFillColor($data);
|
||||||
if ($fill_color !== null) {
|
if ($fill_color !== null) {
|
||||||
$result['fill_color'] = $fill_color;
|
$result['fill_color'] = $fill_color;
|
||||||
}
|
}
|
||||||
@ -1593,7 +1593,7 @@ class Item extends CachedModel
|
|||||||
*
|
*
|
||||||
* @return mixed String representing the border color (not empty) or null.
|
* @return mixed String representing the border color (not empty) or null.
|
||||||
*/
|
*/
|
||||||
private function extractBorderColor(array $data)
|
private static function getBorderColor(array $data)
|
||||||
{
|
{
|
||||||
return static::notEmptyStringOr(
|
return static::notEmptyStringOr(
|
||||||
static::issetInArray($data, ['borderColor', 'border_color', 'gridColor', 'color', 'legendBackgroundColor']),
|
static::issetInArray($data, ['borderColor', 'border_color', 'gridColor', 'color', 'legendBackgroundColor']),
|
||||||
@ -1609,7 +1609,7 @@ class Item extends CachedModel
|
|||||||
*
|
*
|
||||||
* @return mixed String representing the fill color (not empty) or null.
|
* @return mixed String representing the fill color (not empty) or null.
|
||||||
*/
|
*/
|
||||||
private function extractFillColor(array $data)
|
private static function getFillColor(array $data)
|
||||||
{
|
{
|
||||||
return static::notEmptyStringOr(
|
return static::notEmptyStringOr(
|
||||||
static::issetInArray($data, ['fillColor', 'fill_color', 'labelColor']),
|
static::issetInArray($data, ['fillColor', 'fill_color', 'labelColor']),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user