Stud.IP  4.0
 All Data Structures Namespaces Files Functions Variables Groups
Part Class Reference
Inheritance diagram for Part:
Fieldset Form InputRow

Public Member Functions

 __construct (...$parts)
 
 setContextObject ($object)
 
 getContextObject ()
 
 addPart (Part $part)
 
 addInput (Input $input)
 
 render ()
 
 renderWithCondition ()
 
 getAllInputs ()
 
 setParent (Part $parent)
 
 setIfCondition ($if)
 
 getInputFromArray (array $data)
 

Data Fields

 $if = null
 

Protected Attributes

 $parent = null
 
 $contextobject = null
 
 $parts = []
 

Constructor & Destructor Documentation

__construct (   $parts)

Constructor of this Part. Can take one or more Part objects or Input objects or arrays representing an Input object.

Parameters
...$parts

Member Function Documentation

addInput ( Input  $input)

Adds an Input to this Part.

Parameters
Input$input
Returns
Input
addPart ( Part  $part)

Adds a Part object on the next layer.

Parameters
Part$part
Returns
$this
getAllInputs ( )

Recursively returns all Input elements attached to this Part object or any child Parts.

Returns
array
getContextObject ( )

Returns the context object of this Part if there is any. If there is none it tries to return the context-object of a parent object.

Returns
void|null
getInputFromArray ( array  $data)

Returns an Input element from an array.

Parameters
array$data
Returns
array|mixed
Exceptions
\Exception
render ( )

Renders this Part object. This could be a section or any other HTML element with child-elements.

Returns
string
renderWithCondition ( )

Renders the Part element with a condition.

Returns
string
setContextObject (   $object)

Sets the context-object which is most likely a SimpleORMap object

Parameters
$object
Returns
$this
setIfCondition (   $if)

Sets a condition to display this Part. The condition is a javascript condition which is used by vue to hide the input if the condition is not satisfies.

Parameters
string$if
Returns
$this
setParent ( Part  $parent)

Sets the parent object of this Part. Usually this is done automatically.

Parameters
Part$parent
Returns
$this
Exceptions
\Exception

Field Documentation

$contextobject = null
protected
$if = null
$parent = null
protected
$parts = []
protected

The documentation for this class was generated from the following file: