function views_attach_get_arguments_from_token_string in Views attach 6.2
Same name and namespace in other branches
- 7.2 views_attach.module \views_attach_get_arguments_from_token_string()
Get view arguments array from string that contains tokens
@todo: security?
Parameters
$string: The token string defined by the view.
$type: The token type.
$object: The object being used for replacement data (typically a node).
Return value
An array of argument values.
2 calls to views_attach_get_arguments_from_token_string()
- views_attach_plugin_display_node_content::pre_execute in ./
views_attach_plugin_display_node_content.inc - We have to run token replacement before the arguments are used.
- views_attach_plugin_display_profile::pre_execute in ./
views_attach_plugin_display_profile.inc - We have to run token replacement before the arguments are used.
File
- ./
views_attach.module, line 248
Code
function views_attach_get_arguments_from_token_string($string, $type, $object) {
$args = trim($string);
if (empty($args)) {
return array();
}
$args = token_replace($args, $type, $object);
return explode('/', $args);
}