Back to ActionButton class

Method fetchIconClass

public string
fetchIconClass
(string $identifier)
Method to get the CSS class name for an icon identifier.
Parameters
  • string $identifier Icon identification string.
Returns
  • string CSS class name.
Since
  • 4.0.0
Class: ActionButton
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   4.0.0
 */
public function fetchIconClass(string $identifier) : string
{
    // It's an ugly hack, but this allows templates to define the icon classes for the toolbar
    $layout = new FileLayout('joomla.button.iconclass');
    return $layout->render(array('icon' => $identifier));
}