You are here

public function AlphaPaginationCharacter::build in Views Alpha Pagination 7.2

Builds a render array of the character.

Parameters

bool $render: Flag determining whether to render the character.

Return value

array|string A render array or a string of rendered markup if $render is TRUE.

File

src/AlphaPaginationCharacter.php, line 68

Class

AlphaPaginationCharacter
Class AlphaPaginationCharacter.

Code

public function build($render = FALSE) {

  // Render a link.
  if ($this
    ->isLink()) {
    $build = $this
      ->buildLink();
  }
  else {
    $build = [
      '#type' => 'html_tag',
      '#theme' => 'html_tag__alpha_pagination__inactive',
      '#tag' => 'span',
      '#value' => $this
        ->getLabel(),
    ];
  }
  return $render ? drupal_render($build) : $build;
}