Back to Dropdown class

Method publish

public static void
publish
(mixed $checkboxId, mixed $prefix = '')
Append a publish item to the current dropdown menu
Parameters
  • string $checkboxId ID of corresponding checkbox of the record
  • string $prefix The task prefix
Returns
  • void
Since
  • 3.0
Class: Dropdown
Project: Joomla

Method publish - Source code

/**
 * Append a publish item to the current dropdown menu
 *
 * @param   string  $checkboxId  ID of corresponding checkbox of the record
 * @param   string  $prefix      The task prefix
 *
 * @return  void
 *
 * @since   3.0
 */
public static function publish($checkboxId, $prefix = '')
{
    $task = $prefix . 'publish';
    static::addCustomItem(Text::_('JTOOLBAR_PUBLISH'), 'javascript:void(0)', 'onclick="contextAction(\'' . $checkboxId . '\', \'' . $task . '\')"');
}