/** * Zobrazí obrázek hosta * * @param IEHost $host */ public function __construct($host) { $image = 'unknown.gif'; $title = ''; if (is_array($host)) { if (isset($host['icon_image'])) { $image = $host['icon_image']; $title = $host['host_name']; } } else { $image = $host->getDataValue('icon_image'); $title = $host->getName(); } parent::__construct('logos/' . $image, $title, null, null, array('class' => 'host_icon')); }
/** * Zobrazí obrázek platformy * * @param string $platform windows|linux */ public function __construct($platform) { switch ($platform) { case 'windows': $image = 'base/win40.gif'; break; case 'linux': $image = 'base/linux40.gif'; break; default: $image = 'unknown.gif'; break; } parent::__construct('logos/' . $image, $platform); }