aboutsummaryrefslogtreecommitdiff
path: root/mod/ecml/views/default/ecml/keywords/entity.php
blob: 619b17e44f00427da85c390f54060a831efc2a90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/**
 * ECML Generic Object GUID
 *
 * @package ECML
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Curverider Ltd
 * @copyright Curverider Ltd 2008-2010
 * @link http://elgg.org/
 */

$guid = $vars['guid'];

if ($entity = get_entity($guid)) {
	echo elgg_view('output/url', array(
		'href' => $entity->getURL(),
		'title' => $entity->title,
		'text' => $entity->title,
		'class' => "embeded_file link",
		// abusing the js attribute
		'js' => "style=\"background-image:url({$entity->getIcon('tiny')})\""

	));
} else {
	echo elgg_echo('ecml:entity:invalid');
}