Provides a form context around a single entity and its relations. It also can be used as context around an array or iterator of entities. This class lets FormHelper interface with entities or collections of entities. Important Keys: - `entity` The entity this context is operating on. - `table` Either the ORM\Table instance to fetch schema/validators from, an array of table instances in the case of a form spanning multiple entities, or the name(s) of the table. If this.isNull the table name(s) will be determined using naming conventions. - `validator` Either the Validation\Validator to use, or the name of the validation method to call on the table object. For example "default". Defaults to "default". Can be an array of table alias=>validators when dealing with associated forms.
Inherited | Abstract | Final | Static | Datatype | Header |
---|---|---|---|---|---|
bool | bool isPrimaryKey(string pathToField) | ||||
Json | Json _getProp(Json mytarget, string fieldName) | ||||
bool | bool hasError(string fieldPath) | ||||
bool | bool isRequired(string fieldName) | ||||
Json | Json _schemaDefault(Json[string] pathParts) | ||||
Json[string] | Json[string] leafEntity(Json[string] mypath = null) | ||||
Json[string] | Json[string] attributes(string fieldPath) | ||||
int | int getMaxLength(string fieldPath) | ||||
IError[] | IError[] errors(string fieldPath) | ||||
bool | bool initialize(Json[string] initData = null) | ||||
string[] | string[] fieldNames() | ||||
string | string type(string fieldPath) | ||||
string[] | string[] primaryKeys() | ||||
bool | bool isCreate() | ||||
Json[string] | Json[string] _extractMultiple(Json myvalues, Json[string] mypaths) | ||||
string | string getRequiredMessage(string fieldName) | ||||
IValidator | IValidator _getValidator(Json[string] pathParts) | ||||
Json | Json _getProp(IEntity mytarget, string fieldName) | ||||
void | void _prepare() | ||||
IEntity | IEntity /* |iterable|null */ entity(Json[string] mypath = null) | ||||
ITable | ITable _getTable(/* IEntity| * /string[] pathParts, bool isFallback = true) | ||||
Json | Json val(string fieldPath, Json[string] options = null) |