english/administrator/modules/mod_quickicon/helper.php
/**
	 * Helper method to generate a button in administrator panel
	 *
	 * @param	array	A named array with keys link, image, text, access and imagePath
	 *
	 * @return	string	HTML for button
	 * @since	1.6
	 */
Helper method to generate a button in administrator panel
@param       array   A named array with keys link, image, text, access and imagePath

@return      string  HTML for button
@since       1.6
Helper method to generate a button in administrator panel @param array A named array with keys link image text access and imagePath @return string HTML for button @since 1 . 6
public static function button($button)
	{
		if (!empty($button['access'])) {
			if (is_bool($button['access'])) {
				if ($button['access'] == false) {
					return '';
				}
			}
			else {
				for ($i = 0, $n = count($button['access']); $i < $n; $i += 2) {
					if (!JFactory::getUser()->authorise($button['access'][$i], $button['access'][$i+1])) {
						return '';
					}
				}
			}
		}
		ob_start();
		require JModuleHelper::getLayoutPath('mod_quickicon', 'default_button');
		$html = ob_get_clean();
		return $html;
	}
public static function button ( $ button ) { if ( ! empty ( $ button [ 'access' ] ) ) { if ( is_bool ( $ button [ 'access' ] ) ) { if ( $ button [ 'access' ] == false ) { return '' ; } } else { for ( $ i = 0 , $ n = count ( $ button [ 'access' ] ) ; $ i < $ n ; $ i += 2 ) { if ( ! JFactory :: getUser ( ) -> authorise ( $ button [ 'access' ] [ $ i ] , $ button [ 'access' ] [ $ i + 1 ] ) ) { return '' ; } } } } ob_start ( ) ; require JModuleHelper :: getLayoutPath ( 'mod_quickicon' , 'default_button' ) ; $ html = ob_get_clean ( ) ; return $ html ; }
Helper method to generate a button in administrator panel
 @param       array   A named array with keys link, image, text, access and imagePath
Helper method to generate a button in administrator panel @param array A named array with keys link image text access and imagePath
// Take each pair of permission, context values.