Back to Icons class

Method buttons

public static string
buttons
(mixed $buttons)
Method to generate html code for a list of buttons
Parameters
  • array $buttons Array of buttons
Returns
  • string
Since
  • 2.5
Class: Icons
Project: Joomla

Method buttons - Source code

/**
 * Method to generate html code for a list of buttons
 *
 * @param   array  $buttons  Array of buttons
 *
 * @return  string
 *
 * @since   2.5
 */
public static function buttons($buttons)
{
    if (empty($buttons)) {
        return '';
    }
    $html = array();
    foreach ($buttons as $button) {
        $html[] = HTMLHelper::_('icons.button', $button);
    }
    return implode($html);
}