\ButtonHelper

Button Helper

Summary

Methods
Properties
Constants
__call()
getButtonSize()
button()
delete()
save()
cancel()
cancelAndSave()
cancelAndSaveAndSaveTemp()
search()
add()
$helpers
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$helpers

$helpers : array

Other helpers used by FormHelper

Type

array

Methods

__call()

__call(string  $method, array  $params) : mixed

LinkButtonHelperラップ用マジックメソッド。

Parameters

string $method

メソッド

array $params

パラメータ

Returns

mixed

getButtonSize()

getButtonSize() : string

ボタンサイズ取得

Returns

string —

A HTML button tag.

button()

button(string  $title, array  $options = array()) : string

<button>タグの出力

Parameters

string $title

The button's caption. Not automatically HTML encoded

array $options

Array of options and HTML attributes.

Returns

string —

delete()

delete(string  $title, string  $confirm, array  $options = array()) : string

Creates a `<button>` tag. The type attribute defaults to `type="submit"` You can change it to a different value by using `$options['type']`.

Options:

  • escape - HTML entity encode the $title of the button. Defaults to false.

Original options

  • confirm - Add javascript confirm in onclick attribute

Parameters

string $title

The button's caption. Not automatically HTML encoded

string $confirm

Confirm message by button click

array $options

Array of options and HTML attributes.

Returns

string —

A HTML button tag.

save()

save(string  $title, array  $options = array()) : string

Creates a `<button>` tag. The type attribute defaults to `type="submit"` You can change it to a different value by using `$options['type']`.

Options:

  • escape - HTML entity encode the $title of the button. Defaults to false.

Original options

  • confirm - Add javascript confirm in onclick attribute

Parameters

string $title

The button's caption. Not automatically HTML encoded

array $options

Array of options and HTML attributes.

Returns

string —

A HTML button tag.

cancel()

cancel(string  $title, string  $url, array  $options = array()) : string

Creates a `<button>` tag. The type attribute defaults to `type="submit"` You can change it to a different value by using `$options['type']`.

Options:

  • escape - HTML entity encode the $title of the button. Defaults to false.

Original options

  • url - The url in onclick attribute

Parameters

string $title

The button's caption. Not automatically HTML encoded

string $url

The url in onclick attribute

array $options

Array of options and HTML attributes.

Returns

string —

A HTML button tag.

cancelAndSave()

cancelAndSave(string  $cancelTitle, string  $saveTitle, string  $cancelUrl = null, array  $cancelOptions = array(), array  $saveOptions = array()) : string

キャンセル、決定ボタン

Parameters

string $cancelTitle

キャンセルボタンのラベル

string $saveTitle

決定ボタンのラベル

string $cancelUrl

キャンセルボタン押下のURL

array $cancelOptions

キャンセルボタンのオプション

array $saveOptions

決定ボタンのオプション

Returns

string —

A HTML button tag.

cancelAndSaveAndSaveTemp()

cancelAndSaveAndSaveTemp(string  $cancelUrl = null, array  $cancelOptions = array(), array  $saveTempOptions = array(), array  $saveOptions = array(), string|null  $backUrl = null) : string

キャンセル、一時保存、決定ボタン

Parameters

string $cancelUrl

キャンセルボタン押下のURL

array $cancelOptions

キャンセルボタンのオプション

array $saveTempOptions

一時保存ボタンのオプション

array $saveOptions

決定ボタンのオプション

string|null $backUrl

Back url

Returns

string —

ボタン群のタグ.

search()

search(string  $title, array  $options = array()) : string

検索ボタンの出力

Parameters

string $title

タイトル

array $options

button属性

Returns

string —

ボタンHTML.

add()

add(string  $title, array  $options = array()) : string

追加ボタンの出力

Parameters

string $title

タイトル

array $options

button属性

Returns

string —

ボタンHTML.