Documentation

FormView
in package
implements ArrayAccess, IteratorAggregate, Countable

Tags
author

Bernhard Schussek bschussek@gmail.com

implements

\ArrayAccess<int|string, FormView>

implements

\IteratorAggregate<int|string, FormView>

Table of Contents

Interfaces

ArrayAccess
IteratorAggregate
Countable

Properties

$children  : array<int|string, FormView>
The child views.
$parent  : mixed
The parent view.
$vars  : mixed
The variables assigned to this view.
$methodRendered  : bool
$rendered  : bool
Is the form attached to this renderer rendered?

Methods

__construct()  : mixed
count()  : int
getIterator()  : ArrayIterator<int|string, FormView>
Returns an iterator to iterate over children (implements \IteratorAggregate).
isMethodRendered()  : bool
isRendered()  : bool
Returns whether the view was already rendered.
offsetExists()  : bool
Returns whether the given child exists (implements \ArrayAccess).
offsetGet()  : self
Returns a child by name (implements \ArrayAccess).
offsetSet()  : void
Implements \ArrayAccess.
offsetUnset()  : void
Removes a child (implements \ArrayAccess).
setMethodRendered()  : mixed
setRendered()  : $this
Marks the view as rendered.

Properties

$parent

The parent view.

public mixed $parent

$vars

The variables assigned to this view.

public mixed $vars = ['value' => null, 'attr' => []]

$methodRendered

private bool $methodRendered = false

$rendered

Is the form attached to this renderer rendered?

private bool $rendered = false

Rendering happens when either the widget or the row method was called. Row implicitly includes widget, however certain rendering mechanisms have to skip widget rendering when a row is rendered.

Methods

__construct()

public __construct([self $parent = null ]) : mixed
Parameters
$parent : self = null

count()

public count() : int
Return values
int

getIterator()

Returns an iterator to iterate over children (implements \IteratorAggregate).

public getIterator() : ArrayIterator<int|string, FormView>
Return values
ArrayIterator<int|string, FormView>

isMethodRendered()

public isMethodRendered() : bool
Return values
bool

isRendered()

Returns whether the view was already rendered.

public isRendered() : bool
Return values
bool

offsetExists()

Returns whether the given child exists (implements \ArrayAccess).

public offsetExists(int|string $name) : bool
Parameters
$name : int|string

The child name

Return values
bool

offsetGet()

Returns a child by name (implements \ArrayAccess).

public offsetGet(int|string $name) : self
Parameters
$name : int|string

The child name

Return values
self

offsetSet()

Implements \ArrayAccess.

public offsetSet(mixed $name, mixed $value) : void
Parameters
$name : mixed
$value : mixed
Tags
throws
BadMethodCallException

always as setting a child by name is not allowed

offsetUnset()

Removes a child (implements \ArrayAccess).

public offsetUnset(int|string $name) : void
Parameters
$name : int|string

The child name

setMethodRendered()

public setMethodRendered() : mixed

setRendered()

Marks the view as rendered.

public setRendered() : $this
Return values
$this

        
On this page

Search results