You are here

protected function KanbanService::getColor in Content Planner 8

Gets the Color.

Parameters

int $index: The index associated with the requested color.

Return value

string Returns the color id for the given index.

1 call to KanbanService::getColor()
KanbanService::getEntityTypeConfigs in modules/content_kanban/src/KanbanService.php
Get Entity Type Configs.

File

modules/content_kanban/src/KanbanService.php, line 188

Class

KanbanService
Class KanbanService.

Namespace

Drupal\content_kanban

Code

protected function getColor($index) {

  // If the desired index is greater than the count of defined colors.
  if ($index + 1 > count($this->definedColors)) {
    $index = 0;
  }
  return $this->definedColors[$index];
}