function views_rdf_sioc_views_argument in Views Datasource 5
argument hook that will display the RDF data document or display export icons.
2 calls to views_rdf_sioc_views_argument()
- views_rdf_sioc_handler in ./
views_rdf.module - handler for our own RDF SIOC argument handler
- views_rdf_views_post_view in ./
views_rdf.module - post view to display the render icons
File
- ./
views_rdf.module, line 107 - Provides Views plugin for rendering node content as RDF.
Code
function views_rdf_sioc_views_argument($op, &$view, $arg) {
if ($op == 'argument' && $arg == 'rdf_sioc') {
$view->page_type = 'views_' . $arg;
}
else {
if ($op == 'post_view' && $view->build_type != 'block') {
$args = views_post_view_make_args($view, $arg, $arg);
$url = views_get_url($view, $args);
$title = views_get_title($view, 'page', $args);
$links = array();
if ($arg == 'rdf_sioc') {
if ($image = theme('image', drupal_get_path('module', 'views_rdf') . '/sioc100x98.png', t('SIOC'), t('Show @title as a SIOC document.', array(
'@title' => $title,
)))) {
$links[] = l($image, $url, array(
'class' => 'rdf-icon',
), $url_filter, NULL, FALSE, TRUE);
return implode(' ', $links);
}
}
}
}
}