public function outputRawIcon($entity_guid, $size = null) {
		if (headers_sent()) {
			exit;
		}
		$ha = access_get_show_hidden_status();
		access_show_hidden_entities(true);
		$entity = get_entity($entity_guid);
		if (!$entity) {
			exit;
		}
		$size = strtolower($size ? : 'medium');
		$filename = "icons/" . $entity->guid . $size . ".jpg";
		$etag = md5($entity->icontime . $size);
		$filehandler = new \ElggFile();
		$filehandler->owner_guid = $entity->owner_guid;
		$filehandler->setFilename($filename);
		if ($filehandler->exists()) {
			$filehandler->open('read');
			$contents = $filehandler->grabFile();
			$filehandler->close();
		} else {
			forward('', '404');
		}
		$mimetype = ($entity->mimetype) ? $entity->mimetype : 'image/jpeg';
		access_show_hidden_entities($ha);
		header("Content-type: $mimetype");
		header("Etag: $etag");
		header('Expires: ' . date('r', time() + 864000));
		header("Pragma: public");
		header("Cache-Control: public");
		header("Content-Length: " . strlen($contents));
		echo $contents;
		exit;
	}
public function outputRawIcon($entity_guid, $size = null) {
		if (headers_sent()) {
			exit;
		}
		$ha = access_get_show_hidden_status();
		access_show_hidden_entities(true);
		$entity = get_entity($entity_guid);
		if (!$entity) {
			exit;
		}
		$size = strtolower($size ? : 'medium');
		$filename = "icons/" . $entity->guid . $size . ".jpg";
		$etag = md5($entity->icontime . $size);
		$filehandler = new \ElggFile();
		$filehandler->owner_guid = $entity->owner_guid;
		$filehandler->setFilename($filename);
		if ($filehandler->exists()) {
			$filehandler->open('read');
			$contents = $filehandler->grabFile();
			$filehandler->close();
		} else {
			forward('', '404');
		}
		$mimetype = ($entity->mimetype) ? $entity->mimetype : 'image/jpeg';
		access_show_hidden_entities($ha);
		header("Content-type: $mimetype");
		header("Etag: $etag");
		header('Expires: ' . date('r', time() + 864000));
		header("Pragma: public");
		header("Cache-Control: public");
		header("Content-Length: " . strlen($contents));
		echo $contents;
		exit;
	}
public function outputRawIcon ( $ entity_guid , $ size = null ) { if ( headers_sent ( ) ) { exit ; } $ ha = access_get_show_hidden_status ( ) ; access_show_hidden_entities ( true ) ; $ entity = get_entity ( $ entity_guid ) ; if ( ! $ entity ) { exit ; } $ size = strtolower ( $ size ? : 'medium' ) ; $ filename = "icons/" . $ entity -> guid . $ size . ".jpg" ; $ etag = md5 ( $ entity -> icontime . $ size ) ; $ filehandler = new \ ElggFile ( ) ; $ filehandler -> owner_guid = $ entity -> owner_guid ; $ filehandler -> setFilename ( $ filename ) ; if ( $ filehandler -> exists ( ) ) { $ filehandler -> open ( 'read' ) ; $ contents = $ filehandler -> grabFile ( ) ; $ filehandler -> close ( ) ; } else { forward ( '' , '404' ) ; } $ mimetype = ( $ entity -> mimetype ) ? $ entity -> mimetype : 'image/jpeg' ; access_show_hidden_entities ( $ ha ) ; header ( "Content-type: $mimetype" ) ; header ( "Etag: $etag" ) ; header ( 'Expires: ' . date ( 'r' , time ( ) + 864000 ) ) ; header ( "Pragma: public" ) ; header ( "Cache-Control: public" ) ; header ( "Content-Length: " . strlen ( $ contents ) ) ; echo $ contents ; exit ; }
Outputs raw icon

@param int    $entity_guid GUID of an entity
@param string $size        Icon size
@return void
Outputs raw icon