FormatterHelper

class FormatterHelper extends Helper The Formatter class provides helpers to format messages. Methods setHelperSet(HelperSet $helperSet = null) Sets the helper set associated with this helper. from Helper HelperSet getHelperSet() Gets the helper set associated with this helper. from Helper static int strlen(string $string) Returns the length of a string, using mb_strwidth if it is available. from Helper static formatTime($secs) from Helper static formatMemory($memory)

Form::submit()

FormInterface submit(null|string|array $submittedData, bool $clearMissing = true) Submits data to the form, transforms and validates it. Parameters null|string|array $submittedData The submitted data bool $clearMissing Whether to set fields to NULL when they are missing in the submitted data. Return Value FormInterface The form instance Exceptions AlreadySubmittedException If the form has already been submitted.

Form::setValues()

Form setValues(array $values) Sets the value of the fields. Parameters array $values An array of field values Return Value Form

Form::setParent()

FormInterface setParent(FormInterface $parent = null) Sets the parent form. Parameters FormInterface $parent The parent form or null if it's the root Return Value FormInterface The form instance Exceptions AlreadySubmittedException If the form has already been submitted. LogicException When trying to set a parent for a form with an empty name.

Form::setData()

FormInterface setData(mixed $modelData) Updates the form with default data. Parameters mixed $modelData The data formatted as expected for the underlying object Return Value FormInterface The form instance Exceptions AlreadySubmittedException If the form has already been submitted. LogicException If listeners try to call setData in a cycle. Or if the view data does not match the expected type according to {@link FormConfigInterface::getDataClass}.

Form::remove()

FormInterface remove(string $name) Removes a child from the form. Parameters string $name The name of the child to remove Return Value FormInterface The form instance Exceptions AlreadySubmittedException If the form has already been submitted.

Form::remove()

remove(string $name) Removes a field from the form. Parameters string $name The field name

Form::offsetUnset()

offsetUnset(string $name) Removes the child with the given name from the form (implements the \ArrayAccess interface). Parameters string $name The name of the child to remove Exceptions AlreadySubmittedException If the form has already been submitted.

Form::offsetUnset()

offsetUnset(string $name) Removes a field from the form. Parameters string $name The field name

Form::offsetSet()

offsetSet(string $name, FormInterface $child) Adds a child to the form (implements the \ArrayAccess interface). Parameters string $name Ignored. The name of the child is used FormInterface $child The child to be added Exceptions AlreadySubmittedException If the form has already been submitted. LogicException When trying to add a child to a non-compound form. See also self::add()