Back to ToolbarHelper class

Method custom

public static void
custom
(mixed $task = '', mixed $icon = '', mixed $iconOver = '', mixed $alt = '', mixed $listSelect = true, mixed $formId = null)
Writes a custom option and task button for the button bar.
Parameters
  • string $task The task to perform (picked up by the switch( $task ) blocks).
  • string $icon The image to display.
  • string $iconOver @deprecated 5.0
  • string $alt The alt text for the icon image.
  • bool $listSelect True if required to check that a standard list item is checked.
  • string $formId The id of action form.
Returns
  • void
Since
  • 1.5
Class: ToolbarHelper
Project: Joomla

Method custom - Source code

/**
 * Writes a custom option and task button for the button bar.
 *
 * @param   string  $task        The task to perform (picked up by the switch($task) blocks).
 * @param   string  $icon        The image to display.
 * @param   string  $iconOver    @deprecated 5.0
 * @param   string  $alt         The alt text for the icon image.
 * @param   bool    $listSelect  True if required to check that a standard list item is checked.
 * @param   string  $formId      The id of action form.
 *
 * @return  void
 *
 * @since   1.5
 */
public static function custom($task = '', $icon = '', $iconOver = '', $alt = '', $listSelect = true, $formId = null)
{
    $bar = Toolbar::getInstance('toolbar');
    // Strip extension.
    $icon = preg_replace('#\\.[^.]*$#', '', $icon);
    // Add a standard button.
    $bar->appendButton('Standard', $icon, $alt, $task, $listSelect, $formId);
}