Back to ToolbarButton class

Method fetchIconClass

public string
fetchIconClass
(mixed $identifier)
Method to get the CSS class name for an icon identifier
Parameters
  • string $identifier Icon identification string
Returns
  • string CSS class name
Since
  • 3.0
Class: ToolbarButton
Project: Joomla

Method fetchIconClass - Source code

/**
 * Method to get the CSS class name for an icon identifier
 *
 * Can be redefined in the final class
 *
 * @param   string  $identifier  Icon identification string
 *
 * @return  string  CSS class name
 *
 * @since   3.0
 */
public function fetchIconClass($identifier)
{
    // It's an ugly hack, but this allows templates to define the icon classes for the toolbar
    $layout = new FileLayout('joomla.toolbar.iconclass');
    return $layout->render(array('icon' => $identifier));
}