PHP 클래스 View_Button, atk4

(c) 2008-2011 Romans Malinovskis Distributed under Affero General Public License v3 See http://agiletoolkit.org/about/license =====================================================ATK4=
상속: extends View_HtmlElement
파일 보기 프로젝트 열기: atk4/atk4 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$icon This property looks quite obsolete
$js_active_class jQuery-UI class for active (selected) button
$js_triangle_class jQuery-UI class for triangle, down arrow button
$menu Menu_jUI
$menu_class Menu class
$options Options to pass to JS button widget
$popover_class Popover class
$virtual_page VirtualPage

보호된 프로퍼티들

프로퍼티 타입 설명
$js_button_called boolean

공개 메소드들

메소드 설명
addMenu ( array $options = [], boolean $vertical = false ) : Menu Show menu when clicked. For example, dropdown menu.
addPopover ( array $js_options = [], array $class_options = null ) : View_Popover When button is clicked, opens a frame containing generic view.
addSplitButton ( array $options = null ) : Button Adds another button after this one with an arrow and returns it.
defaultTemplate ( ) Set template of button element.
getPosition ( boolean $vertical = false ) : array Return array with position settings for JS.
isClicked ( string $message = null ) : boolean Add click handler on button and returns true if button was clicked.
jsButton ( )
link ( string $page, array $args = [] ) Set button as HTML link object .
onClick ( callback $callback, string $confirm_msg = null ) Add click handler on button and executes $callback if button was clicked.
onClickConsole ( callable $callback, string $title = null ) Add click handler on button, that will execute callback. Similar to onClick, however output from callback execution will appear in a dialog window with a console.
render ( ) Render button.
setIcon ( string $icon ) Sets icon for button.
setLabel ( string | array $label ) Sets label of button.
setNoText ( string $icon = null ) Set button without text and optionally with icon.

메소드 상세

addMenu() 공개 메소드

Show menu when clicked. For example, dropdown menu.
public addMenu ( array $options = [], boolean $vertical = false ) : Menu
$options array Options to pass to Menu class
$vertical boolean Direction of menu (false=horizontal, true=vertical)
리턴 Menu

addPopover() 공개 메소드

Because this is based on a dialog (popover), this is a modal action even though it does not add dimming / transparency.
public addPopover ( array $js_options = [], array $class_options = null ) : View_Popover
$js_options array Options to pass to popover JS widget
$class_options array Options to pass to popover PHP class
리턴 View_Popover

addSplitButton() 공개 메소드

Adds another button after this one with an arrow and returns it.
public addSplitButton ( array $options = null ) : Button
$options array Options to pass to new Button class
리턴 Button New button object (button with triangle)

defaultTemplate() 공개 메소드

Set template of button element.
public defaultTemplate ( )

getPosition() 공개 메소드

Return array with position settings for JS.
public getPosition ( boolean $vertical = false ) : array
$vertical boolean Direction of menu (false=horizontal, true=vertical)
리턴 array

isClicked() 공개 메소드

Add click handler on button and returns true if button was clicked.
public isClicked ( string $message = null ) : boolean
$message string Confirmation question to ask
리턴 boolean

jsButton() 공개 메소드

public jsButton ( )
Add click handler on button and executes $callback if button was clicked.
public onClick ( callback $callback, string $confirm_msg = null )
$callback callback Callback function to execute
$confirm_msg string Confirmation question to ask

onClickConsole() 공개 메소드

Add click handler on button, that will execute callback. Similar to onClick, however output from callback execution will appear in a dialog window with a console.
public onClickConsole ( callable $callback, string $title = null )
$callback callable
$title string

render() 공개 메소드

Render button.
public render ( )

setIcon() 공개 메소드

Sets icon for button.
public setIcon ( string $icon )
$icon string Icon CSS class

setLabel() 공개 메소드

Sets label of button.
public setLabel ( string | array $label )
$label string | array

setNoText() 공개 메소드

Set button without text and optionally with icon.
public setNoText ( string $icon = null )
$icon string Icon CSS class

프로퍼티 상세

$icon 공개적으로 프로퍼티

This property looks quite obsolete
public $icon

$js_active_class 공개적으로 프로퍼티

jQuery-UI class for active (selected) button
public $js_active_class

$js_button_called 보호되어 있는 프로퍼티

protected bool $js_button_called
리턴 boolean

$js_triangle_class 공개적으로 프로퍼티

jQuery-UI class for triangle, down arrow button
public $js_triangle_class

$menu 공개적으로 프로퍼티

public Menu_jUI $menu
리턴 Menu_jUI

$menu_class 공개적으로 프로퍼티

Menu class
public $menu_class

$options 공개적으로 프로퍼티

Options to pass to JS button widget
public $options

$popover_class 공개적으로 프로퍼티

Popover class
public $popover_class

$virtual_page 공개적으로 프로퍼티

public VirtualPage $virtual_page
리턴 VirtualPage