Back to MediaHelper class

Method getTypeIcon

public static string
getTypeIcon
(mixed $fileName)
Gets the file extension for purposed of using an icon
Parameters
  • string $fileName The filename
Returns
  • string File extension to determine icon
Since
  • 3.2
Class: MediaHelper
Project: Joomla

Method getTypeIcon - Source code

/**
 * Gets the file extension for purposed of using an icon
 *
 * @param   string  $fileName  The filename
 *
 * @return  string  File extension to determine icon
 *
 * @since   3.2
 */
public static function getTypeIcon($fileName)
{
    return strtolower(substr($fileName, strrpos($fileName, '.') + 1));
}