getBaseUrl();
}
$icons = self::_getIconFilenames();
if (!isset($icons[$name])) {
throw new Msd_Exception(
'GetIcon: unknown icon \''.$name .'\' requested'
);
}
$config = Msd_Configuration::getInstance();
$img = '';
if ($size>'') {
$img = '';
$ret = sprintf(
$img,
$config->get('paths.iconpath'),
$size,
$size,
$icons[$name],
$title, $title
);
} else {
$ret = sprintf(
$img,
$config->get('paths.iconpath'),
$icons[$name],
$title,
$title
);
}
return $ret;
}
/**
* Get default values from defaultConfig.ini
*
* @return object
*/
private function _getIconFilenames ()
{
static $icons = false;
if (!$icons) {
$config = Msd_Configuration::getInstance();
$file = realpath(
APPLICATION_PATH . DS . '..' . DS . 'public'
. DS . $config->get('paths.iconpath') . DS . 'icon.ini'
);
$iconsIni = new Zend_Config_Ini($file, 'icons');
$icons = $iconsIni->toArray();
unset($iconsIni);
}
return $icons;
}
}