FormView
in package
implements
ArrayAccess, IteratorAggregate, Countable
Tags
Interfaces, Classes, Traits and Enums
- ArrayAccess
- IteratorAggregate
- Countable
Table of Contents
- $children : array<string|int, FormView>
- The child views.
- $parent : mixed
- The parent view.
- $vars : mixed
- The variables assigned to this view.
- $methodRendered : mixed
- $rendered : bool
- Is the form attached to this renderer rendered?
- __construct() : mixed
- count() : int
- Implements \Countable.
- getIterator() : ArrayIterator<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
$children
The child views.
public
array<string|int, FormView>
$children
= []
$parent
The parent view.
public
mixed
$parent
$vars
The variables assigned to this view.
public
mixed
$vars
= ['value' => null, 'attr' => []]
$methodRendered
private
mixed
$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
Return values
mixed —count()
Implements \Countable.
public
count() : int
Return values
int —The number of children views
getIterator()
Returns an iterator to iterate over children (implements \IteratorAggregate).
public
getIterator() : ArrayIterator<string, FormView>
Return values
ArrayIterator<string, FormView> —The iterator
isMethodRendered()
public
isMethodRendered() : bool
Return values
bool —isRendered()
Returns whether the view was already rendered.
public
isRendered() : bool
Return values
bool —Whether this view's widget is rendered
offsetExists()
Returns whether the given child exists (implements \ArrayAccess).
public
offsetExists(string $name) : bool
Parameters
- $name : string
-
The child name
Return values
bool —Whether the child view exists
offsetGet()
Returns a child by name (implements \ArrayAccess).
public
offsetGet(string $name) : self
Parameters
- $name : string
-
The child name
Return values
self —The child view
offsetSet()
Implements \ArrayAccess.
public
offsetSet(mixed $name, mixed $value) : void
Parameters
- $name : mixed
- $value : mixed
Tags
Return values
void —offsetUnset()
Removes a child (implements \ArrayAccess).
public
offsetUnset(string $name) : void
Parameters
- $name : string
-
The child name
Return values
void —setMethodRendered()
public
setMethodRendered() : mixed
Return values
mixed —setRendered()
Marks the view as rendered.
public
setRendered() : $this