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
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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

Защищенные свойства (Protected)

Свойство Тип Описание
$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