protected function views_handler_field_megarow_links::getTokenType in Views Megarow 7
Returns the available token type based on the view default entity type.
Return value
string
1 call to views_handler_field_megarow_links::getTokenType()
- views_handler_field_megarow_links::options_form in includes/
views/ handlers/ views_handler_field_megarow_links.inc - Default options form provides the label widget that all fields should have.
File
- includes/
views/ handlers/ views_handler_field_megarow_links.inc, line 62
Class
- views_handler_field_megarow_links
- Megarow handler that outputs the links which open the megarow.
Code
protected function getTokenType() {
static $token_type;
if (empty($token_type)) {
$table_data = views_fetch_data($this->table);
$token_type = str_replace('_', '-', $table_data['table']['entity type']);
}
// Hardcode the pattern for taxonomy terms.
if ($token_type == 'taxonomy-term') {
$token_type = 'term';
}
return $token_type;
}