mosHTML::PrintIcon

Last reviewed: Not reviewed
phpDocumentor

mosHTML::PrintIcon

Displays a standard print icon. The alternative text for the icon will be taken from the current language settings.

Syntax

void PrintIcon ( int &$row, object &$params, boolean $enable, string $link [, string $window_params] )

$row
is the row index.
$params
is an object of type mosParameters. If $params->get( 'print' ) is false then this function will produce no output. If $params->get( 'popup' ) is true then the icon will be a print icon; if false it will be a print preview icon. If $params->get( 'icons' ) is true then the print button will be in the form of an image; if false it will be a text link.
$hide_js
is a flag. If true then this function will produce no output.
$link
is the complete URI of the resource to be printed or print previewed.
$window_params
is a string containing the window parameters that will be used for the popup print preview window. This parameter is optional and if omitted will default to 'status=no, toolbar=no, scrollbars=yes, titlebar=no, menubar=no, resizable=yes, width=640, height=480, directories=no, location=no'.

Examples

Example: In this example the popup window that will be opened if the print icon is clicked will make use of the standard window parameters.

// Set-up the parameters object.
$params = & new mosParameters( '' );
$params->def( 'print', true );
$params->def( 'popup', true );
$params->def( 'icons', true );
 
// Set-up the URL that will be opened if the print icon is clicked.
$url = $mosConfig_live_site . '/index2.php?option=com_content&task=view&id=' .
      $row->id .'&Itemid='. $Itemid;
 
// Draw the Print icon.
mosHTML::PrintIcon( $row, $params, false, $url );

Please report any errors on this page to the Developer Documentation Forum.

Last Updated ( Thursday, 26 October 2006 )