You are here

public function ChecklistapiChecklist::getNumberCompleted in Checklist API 8

Gets the total number of completed items.

Return value

int The number of completed items.

1 call to ChecklistapiChecklist::getNumberCompleted()
ChecklistapiChecklist::getPercentComplete in src/ChecklistapiChecklist.php
Gets the percentage of items complete.

File

src/ChecklistapiChecklist.php, line 153

Class

ChecklistapiChecklist
Defines the checklist class.

Namespace

Drupal\checklistapi

Code

public function getNumberCompleted() {
  return !empty($this->savedProgress['#completed_items']) ? $this->savedProgress['#completed_items'] : 0;
}