public function showLeadershipBlock($leaders, $extended_registration = FALSE) {
    if (!empty($leaders)) {
      $output = [
        '#theme' => 'openy_campaign_leadership',
        '#leaders' => $leaders,
        '#extended_registration' => $extended_registration,
      ];
    }
    else {
      $config = $this->config('openy_campaign.general_settings');
      $output = [
        '#prefix' => '<div class="leadership-no-results">',
        '#markup' => $config->get('activities_count_no_results_message'),
        '#suffix' => '</div>',
      ];
    }

    $render = $this->renderer->render($output);

    return $render;
  }
public function showLeadershipBlock($leaders, $extended_registration = FALSE) {
    if (!empty($leaders)) {
      $output = [
        '#theme' => 'openy_campaign_leadership',
        '#leaders' => $leaders,
        '#extended_registration' => $extended_registration,
      ];
    }
    else {
      $config = $this->config('openy_campaign.general_settings');
      $output = [
        '#prefix' => '<div class="leadership-no-results">',
        '#markup' => $config->get('activities_count_no_results_message'),
        '#suffix' => '</div>',
      ];
    }

    $render = $this->renderer->render($output);

    return $render;
  }
public function showLeadershipBlock ( $ leaders , $ extended_registration = FALSE ) { if ( ! empty ( $ leaders ) ) { $ output = [ '#theme' => 'openy_campaign_leadership' , '#leaders' => $ leaders , '#extended_registration' => $ extended_registration , ] ; } else { $ config = $ this -> config ( 'openy_campaign.general_settings' ) ; $ output = [ '#prefix' => '<div class="leadership-no-results">' , '#markup' => $ config -> get ( 'activities_count_no_results_message' ) , '#suffix' => '</div>' , ] ; } $ render = $ this -> renderer -> render ( $ output ) ; return $ render ; }
Render Leadership Block.

@param array $leaders Leaders list
@param bool $extended_registration Extended registration flag

@return \Drupal\Component\Render\MarkupInterface
@throws \Exception
Render Leadership Block .