\Hazaar\Forms
Model
Model short summary.

Model description.

Tags

Version

1.0

Author

jamiec

Summary
Methods Properties Constants
api
get
set
set
No constants
Properties
$__form
$__form
$__form_name
$__form_name
$__items
$__items
$__locked
$__locked
$__tags
$__tags
Inherited
$ignore_undefined
$ignore_undefined
Undefined values will be ignored. This is checked first.
Inherited
$values
$values
The current values of all defined fields.
Methods
__construct()
__construct($form_name, $form = null, $tags = null)

Parameters

$form_name

No description

$form

No description

$tags

No description

__field()
__field($field, $form)

Parameters

$field

No description

$form

No description

__group()
__group($fields, $form)

Parameters

$fields

No description

$form

No description

__page()
__page($page, $form)

Parameters

$page

No description

$form

No description

__section()
__section($section, $form)

Parameters

$section

No description

$form

No description

api()
api($target, $args = Array ( ) )

Parameters

$target

No description

$args

No description

convert_definition()
convert_definition($def)

Parameters

$def

No description

evaluate()
evaluate($code)

Parameters

$code

No description

export()
export($array = null)

Parameters

$array

No description

exportField()
exportField($name, $field, $array)

Parameters

$name

No description

$field

No description

$array

No description

filterItems()
filterItems($items, $no_reindex = false, $sub = null)

Parameters

$items

No description

$no_reindex

No description

$sub

No description

fixCodeItem()
fixCodeItem($item)

Parameters

$item

No description

get()
get($key, $exec_filters = true)

Parameters

$key

No description

$exec_filters

No description

getFormDefinition()
getFormDefinition()
getName()
getName()
getPDFTitle()
getPDFTitle($params = null)

Parameters

$params

No description

getTitle()
getTitle()
init()
init()
load()
load($form)

Parameters

$form

No description

lock()
lock()
matchReplace()
matchReplace($string, $use_label = false, $params = Array ( ) )

Parameters

$string

No description

$use_label

No description

$params

No description

resolve()
resolve()
set()
set($key, $value, $exec_filters = true)

Parameters

$key

No description

$value

No description

$exec_filters

No description

setTags()
setTags($tags)

Parameters

$tags

No description

toFormArray()
toFormArray() : mixed
Return the form data to send to the client frontend

This method returns forms data with fields stripped if they are tagged and those tags are not set.

Returns

mixed
unlock()
unlock()
Inherited
offsetExists()
offsetExists($offset)
Array Access Methods

Parameters

$offset

No description

Inherited
offsetGet()
offsetGet($offset)

Parameters

$offset

No description

Inherited
offsetSet()
offsetSet($offset, $value)

Parameters

$offset

No description

$value

No description

Inherited
offsetUnset()
offsetUnset($offset)

Parameters

$offset

No description

Inherited
populate()
populate($data, $exec_filters = false) : boolean
Populate the model with data contained in the supplied array.

Parameters

$datamixed

The array of data.

$exec_filtersmixed

Execute any callback filters. For populate this is disabled by default.

Returns

boolean
Inherited
prepare()
prepare($data)

Parameters

$data

No description

Inherited
push()
push($key, $item) : mixed
Alias for Hazaar\Model\Strict::append()

Added to help remove some confusion as to appends purpose.

Parameters

$keystring

The name of the array field to push to.

$itemmixed

The item to push on to the end of the array.

Returns

mixed

The item that was just pushed.

Inherited
rewind()
rewind()

Set the internal pointer the first element

Tags

Since

1.0.0

Inherited
set()
set($key, $value, $exec_filters = true)

Parameters

$key

No description

$value

No description

$exec_filters

No description

Inherited
toArray()
toArray($disable_callbacks = false, $depth = null, $show_hidden = true)
Convert data into an array

If field values are Strict models, then convert them to arrays as well.

Tags

Since

1.0.0

Parameters

$disable_callbacks

No description

$depth

No description

$show_hidden

No description

Inherited
valid()
valid()

Test that an element exists at the current internal pointer position

Tags

Since

1.0.0