function oa_related_make_icons in Open Atrium Related Content 7.2
Helper function to return an array of file action icons
Parameters
$node:
$file:
1 call to oa_related_make_icons()
- oa_related_oa_paragraph_content_render in ./
oa_related.paragraphs.inc - Render function for the paragraph_content bundle.
File
- ./
oa_related.paragraphs.inc, line 196 - Render various paragraph types.
Code
function oa_related_make_icons($node, $file) {
$icons = array();
if ($node->type == 'oa_wiki_page' && !empty($node->field_oa_media[LANGUAGE_NONE])) {
$icons[] = l("<i class='icon-eye-open'></i>", 'node/' . $node->nid . '/view', array(
'html' => TRUE,
));
}
if (node_access('update', $node)) {
$icons[] = l("<i class='icon-pencil'></i>", 'node/' . $node->nid . '/edit', array(
'html' => TRUE,
));
}
if (isset($file)) {
$uri = file_entity_download_uri($file);
$uri['options']['html'] = TRUE;
$icons[] = l("<i class='icon-download'></i>", $uri['path'], $uri['options']);
}
return $icons;
}