code: private function _getIds($type)
      {
          $ids = [];
          foreach ($this->entities as $entity) {
              if ($entity->role == $type) {
                  $ids[] = $entity->account->accountId;
              }
          }
  
          return $ids;
      }
docs: @param string $type
  
  @return array