PHP Class PMA\libraries\Header

Show file Open project: phpmyadmin/phpmyadmin Class Usage Examples

Public Methods

Method Description
__construct ( ) Creates a new class instance
disable ( ) : void Disables the rendering of the header
disableMenuAndConsole ( ) : void Disables the display of the top menu
disableWarnings ( ) : void Disables the display of the top menu
enablePrintView ( ) : void Turns on 'print view' mode
getDisplay ( ) : string Generates the header
getJsParams ( ) : array Returns, as an array, a list of parameters used on the client side
getJsParamsCode ( ) : string Returns, as a string, a list of parameters used on the client side
getMenu ( ) : Menu Returns the Menu object
getMessage ( ) : string Returns the message to be displayed at the top of the page, including the executed SQL query, if any.
getScripts ( ) : Scripts Returns the Scripts object
getTitleTag ( ) : string Returns the TITLE tag
getVersionParameter ( ) : string Returns the phpMyAdmin version to be appended to the url to avoid caching between versions
sendHttpHeaders ( ) : void Sends out the HTTP headers
setAjax ( boolean $isAjax ) : void Set the ajax flag to indicate whether we are servicing an ajax request
setBodyId ( string $id ) : void Setter for the ID attribute in the BODY tag
setTitle ( string $title ) : void Setter for the title of the page

Private Methods

Method Description
_addDefaultScripts ( ) : void Loads common scripts
_addRecentTable ( string $db, string $table ) : string Add recently used table and reload the navigation.
_getBodyStart ( ) : string Returns the close tag to the HEAD and the start tag for the BODY
_getHtmlStart ( ) : string Returns the DOCTYPE and the start HTML tag
_getLinkTags ( ) : string Returns the LINK tags for the favicon and the stylesheets
_getMetaTags ( ) : string Returns the META tags
_getPageTitle ( ) : string If the page is missing the title, this function will set it to something reasonable
_getWarnings ( ) : string Returns some warnings to be displayed at the top of the page

Method Details

__construct() public method

Creates a new class instance
public __construct ( )

disable() public method

Disables the rendering of the header
public disable ( ) : void
return void

disableMenuAndConsole() public method

Disables the display of the top menu
public disableMenuAndConsole ( ) : void
return void

disableWarnings() public method

Disables the display of the top menu
public disableWarnings ( ) : void
return void

enablePrintView() public method

Turns on 'print view' mode
public enablePrintView ( ) : void
return void

getDisplay() public method

Generates the header
public getDisplay ( ) : string
return string The header

getJsParams() public method

Returns, as an array, a list of parameters used on the client side
public getJsParams ( ) : array
return array

getJsParamsCode() public method

Returns, as a string, a list of parameters used on the client side
public getJsParamsCode ( ) : string
return string

getMenu() public method

Returns the Menu object
public getMenu ( ) : Menu
return Menu object

getMessage() public method

Returns the message to be displayed at the top of the page, including the executed SQL query, if any.
public getMessage ( ) : string
return string

getScripts() public method

Returns the Scripts object
public getScripts ( ) : Scripts
return Scripts object

getTitleTag() public method

Returns the TITLE tag
public getTitleTag ( ) : string
return string the TITLE tag

getVersionParameter() public static method

Returns the phpMyAdmin version to be appended to the url to avoid caching between versions
public static getVersionParameter ( ) : string
return string urlenocded pma version as a parameter

sendHttpHeaders() public method

Sends out the HTTP headers
public sendHttpHeaders ( ) : void
return void

setAjax() public method

Set the ajax flag to indicate whether we are servicing an ajax request
public setAjax ( boolean $isAjax ) : void
$isAjax boolean Whether we are servicing an ajax request
return void

setBodyId() public method

Setter for the ID attribute in the BODY tag
public setBodyId ( string $id ) : void
$id string Value for the ID attribute
return void

setTitle() public method

Setter for the title of the page
public setTitle ( string $title ) : void
$title string New title
return void