PHP Class TbExtendedTooltip

Author: Antonio Ramirez ([email protected])
Inheritance: extends CWidget
Show file Open project: yinhe/yincart

Public Properties

Property Type Description
$connectionID the application component ID that specifies the database connection for storing tooltip information. Defaults to 'db'.
$editable whether the tooltip should be editable or not
$editablePopupPlacement the popup placement of the tooltip editor. Possible values: right | left | top | bottom.
$editableType the type of editable form. Possible values
$emptyTooltipText the text to display on the tooltip if no value has been found
$key the tooltip
$tooltipTable the name of the table for keeping applied migration information. This table will be automatically created if not exists. Defaults to 'tbl_tooltip'. The table structure is: (key varchar(255) primary key, tooltip varchar(255))
$url the url to call

Public Methods

Method Description
init ( ) ### .init()
run ( ) ### .run()

Protected Methods

Method Description
createTooltipsTable ( ) ### .createTooltipsTable()
getDbConnection ( ) : CDbConnection ### .getDbConnection()
getTooltip ( string $key ) : mixed | string ### .getTooltip()
registerClientScript ( ) ### .registerClientScript()
renderContent ( ) ### .renderContent()

Method Details

createTooltipsTable() protected method

Creates the database table to store all edited tooltips
protected createTooltipsTable ( )

getDbConnection() protected method

Returns the currently active database connection. By default, the 'db' application component will be returned and activated. You can call {@link setDbConnection} to switch to a different database connection. Methods such as {@link insert}, {@link createTable} will use this database connection to perform DB queries.
protected getDbConnection ( ) : CDbConnection
return CDbConnection the currently active database connection

getTooltip() protected method

Returns the tooltip stored at the database.
protected getTooltip ( string $key ) : mixed | string
$key string
return mixed | string emptyTool

init() public method

Widget's initialization
public init ( )

registerClientScript() protected method

Registers the
protected registerClientScript ( )

renderContent() protected method

Renders the HTML tag element that renders
protected renderContent ( )

run() public method

Widget's run
public run ( )

Property Details

$connectionID public property

the application component ID that specifies the database connection for storing tooltip information. Defaults to 'db'.
public $connectionID

$editable public property

whether the tooltip should be editable or not
public $editable

$editablePopupPlacement public property

the popup placement of the tooltip editor. Possible values: right | left | top | bottom.
public $editablePopupPlacement

$editableType public property

the type of editable form. Possible values
public $editableType

$emptyTooltipText public property

the text to display on the tooltip if no value has been found
public $emptyTooltipText

$key public property

the tooltip
public $key

$tooltipTable public property

the name of the table for keeping applied migration information. This table will be automatically created if not exists. Defaults to 'tbl_tooltip'. The table structure is: (key varchar(255) primary key, tooltip varchar(255))
public $tooltipTable

$url public property

the url to call
public $url