You are here

public function EntityPagerSetup::getCountWord in Entity Pager 7

Get result count word.

Get the word associated with the count of results. i.e. one, many The number in the result converted to a summary word for privacy.

Return value

text Get a text representation the number of records e.g. none, one or many.

File

includes/EntityPagerSetup.inc, line 225
General setup base Class for Entity Pager module.

Class

EntityPagerSetup
Class EntityPagerSetup.

Code

public function getCountWord() {
  $count = 'invalid';
  if (isset($this->view->result_count)) {
    switch ($this->view->result_count) {
      case 0:
        $count = 'none';
        break;
      case 1:
        $count = 'one';
        break;
      default:
        $count = 'many';
    }
  }
  return $count;
}