public function AlphaPagination::parseAttributes in Views Alpha Pagination 8.2
Parses an attribute string saved in the UI.
Parameters
string $string: The attribute string to parse.
array $tokens: An associative array of token data to use.
Return value
array A parsed attributes array.
File
- src/
AlphaPagination.php, line 869
Class
- AlphaPagination
- A base views handler for alpha pagination.
Namespace
Drupal\alpha_paginationCode
public function parseAttributes($string = NULL, array $tokens = []) {
$attributes = [];
if (!empty($string)) {
$parts = explode(',', $string);
foreach ($parts as $attribute) {
if (strpos($attribute, '|') !== FALSE) {
list($key, $value) = explode('|', $this->token
->replace($attribute, $tokens, [
'clear' => TRUE,
]));
$attributes[$key] = $value;
}
}
}
return $attributes;
}