public function AlphaPaginationCharacter::build in Views Alpha Pagination 8.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 73
Class
- AlphaPaginationCharacter
- Class AlphaPaginationCharacter.
Namespace
Drupal\alpha_paginationCode
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::service('renderer')
->render($build) : $build;
}