You are here

public function ChecklistapiChecklist::getNumberCompleted in Checklist API 7

Gets the total number of completed items.

Return value

int The number of completed items.

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

File

lib/Drupal/checklistapi/ChecklistapiChecklist.php, line 108
Class for Checklist API checklists.

Class

ChecklistapiChecklist
Defines the checklist class.

Code

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