\WorkflowHelper

Workflow Helper

Add your application-wide methods in the class below, your helpers will inherit them.

Summary

Methods
Properties
Constants
beforeRender()
label()
buttons()
inputComment()
comments()
canEdit()
canDelete()
publishLinkButton()
addLinkButton()
$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

beforeRender()

beforeRender(string  $viewFile) : void

Before render callback. beforeRender is called before the view file is rendered.

Overridden in subclasses.

Parameters

string $viewFile

The view file that is going to be rendered

label()

label(integer  $status, array  $labels = array()) : string

ステータスのラベル

Parameters

integer $status

スータス

array $labels

Overwrite Status labels

Returns

string —

ラベルHTML

buttons()

buttons(string  $statusFieldName, string|null  $cancelUrl = null, boolean  $panel = true, string|null  $backUrl = null) : string

ワークフローのボタン表示

Parameters

string $statusFieldName

ステータスのフィールド名("Modelname.fieldname")

string|null $cancelUrl

キャンセルURL

boolean $panel

panel-footerを表示するかどうか

string|null $backUrl

前へのURL

Returns

string —

ボタンHTML

inputComment()

inputComment(string  $statusFieldName, boolean  $displayBlockKey = true, string  $useWorkflowFieldName = null) : string

Output workflow input comment

Parameters

string $statusFieldName

ステータスのフィールド名

boolean $displayBlockKey

block_keyを含めるかどうか

string $useWorkflowFieldName

useWorkflowのフィールド名

Returns

string —

Html

comments()

comments() : string

Output workflow input comment

Returns

string —

Cancel url

canEdit()

canEdit(string  $model, array  $data) : boolean

Check editable permission

Parameters

string $model

This should be "Pluginname.Modelname"

array $data

Model data

Returns

boolean —

True is editable data

canDelete()

canDelete(string  $model, array  $data) : boolean

Check deletable permission

Parameters

string $model

This should be "Pluginname.Modelname"

array $data

Model data

Returns

boolean —

True is editable data

publishLinkButton()

publishLinkButton(string  $title = '', array  $options = array()) : string

Creates a `<a>` tag for publish link link. The type attribute defaults

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.

addLinkButton()

addLinkButton(string  $title = '', mixed  $url = null, array  $options = array()) : string

Creates a `<a>` tag for add link. The type attribute defaults

Parameters

string $title

The button's caption. Not automatically HTML encoded

mixed $url

Link url

array $options

Array of options and HTML attributes.

Returns

string —

A HTML button tag.