private function calculateRegisteredMembers(NodeInterface $node) {
    // Fetch all members from the current campaign.
    /** @var \Drupal\Core\Database\Query\Select $query */
    $query = $this->connection->select('openy_campaign_member_campaign', 'mc');
    $query->addField('mc', 'id');
    $query->condition('mc.campaign', $node->id());
    $query = $query->countQuery();
    $amount = $query->execute()->fetchField();

    return (int) $amount;
  }
private function calculateRegisteredMembers(NodeInterface $node) {
    // Fetch all members from the current campaign.
    /** @var \Drupal\Core\Database\Query\Select $query */
    $query = $this->connection->select('openy_campaign_member_campaign', 'mc');
    $query->addField('mc', 'id');
    $query->condition('mc.campaign', $node->id());
    $query = $query->countQuery();
    $amount = $query->execute()->fetchField();

    return (int) $amount;
  }
private function calculateRegisteredMembers ( NodeInterface $ node ) { // Fetch all members from the current campaign. /** @var \Drupal\Core\Database\Query\Select $query */ $ query = $ this -> connection -> select ( 'openy_campaign_member_campaign' , 'mc' ) ; $ query -> addField ( 'mc' , 'id' ) ; $ query -> condition ( 'mc.campaign' , $ node -> id ( ) ) ; $ query = $ query -> countQuery ( ) ; $ amount = $ query -> execute ( ) -> fetchField ( ) ; return ( int ) $ amount ; }
Get an amount of the registered members.

@param \Drupal\node\NodeInterface $node

@return int Amount of members.
Get an amount of the registered members .