ArrayHelper

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

 Methods

Constructor.

__construct(\View $View, $settings = array()) : void
access public

Parameters

$View

$settings

配列にテキストを追加する

addText(array $array, string $prefix = '', string $suffix = '') : array
access public

Parameters

$array

array

$prefix

string

$suffix

string

Returns

array

afterLayout

afterLayout(\type $layoutFile) 

Parameters

$layoutFile

\type

イベントを発火

dispatchEvent(string $name, array $params = array(), $options = array()) : mixed

Parameters

$name

string

$params

array

$options

Returns

mixed

配列の最初の要素かどうか調べる

first(array $array, mixed $key) : boolean

Parameters

$array

array

配列

$key

mixed

現在のキー

Returns

boolean

配列の最後の要素かどうか調べる

last(array $array, mixed $key) : boolean

Parameters

$array

array

配列

$key

mixed

現在のキー

Returns

boolean

Finds URL for specified action.

url(mixed $url = null, boolean $full = false, $sessionId = true) : string
Returns an URL pointing to a combination of controller and action. Param $url can be: + Empty - the method will find adress to actuall controller/action. + '/' - the method will find base URL of application. + A combination of controller/action - the method will find url for it.

Parameters

$url

mixed

Cake-relative URL, like "/products/edit/92" or "/presidents/elect/4"

                   or an array specifying any of the following: 'controller', 'action',
                   and/or 'plugin', in addition to named arguments (keyed array elements),
                   and standard URL arguments (indexed array elements)

$full

boolean

If true, the full base URL will be prepended to the result

$sessionId

Returns

stringFull translated URL with base path.

Checks if a file exists when theme is used, if no file is found default location is returned

webroot(string $file) : string
PENDING Core Hack

Parameters

$file

string

Returns

string$webPath web path to file.

addTextToArrayのコールバックメソッド

__addText(string $value, string $key, string $add) : string
access private

Parameters

$value

string

$key

string

$add

string

Returns

string