Static
SetGet or field by name, or add a field instance.
Mjoin instance if adding a field, Field instance if getting a field.
Field instance to add, or field name to get
Get the get
flag for all fields in the Mjoin instance.
True if gettable, false otherwise.
Set the get
flag for all fields in the Mjoin instance.
When set to false no read operations will occur on the join tables.
Self for chaining
true
to mark as readable, false otherwise
Add a left join condition to the Mjoin instance, allowing it to operate over multiple tables.
In this form the method will take a function as the second parameter which is a Knex callback function allowing a complex join expression to be built.
Self for chaining
Table name to do a join onto
Add a left join condition to the Mjoin instance, allowing it to operate over multiple tables.
Self for chaining
Table name to do a join onto
Field from the parent table to use as the join link
Join condition (=
, '<`, etc)
Field from the child table to use as the join link
Create a join link between two tables. The order of the fields does not matter, but each field must contain the table name as well as the field name.
This method can be called a maximum of two times for an Mjoin instance:
Please refer to the Editor Mjoin documentation for further details: https://editor.datatables.net/manual/php
Self for chaining
Table and field name
Table and field name
Get the instance's configured name.
The name
of the Join is the JSON property key that is used when
'getting' the data, and the HTTP property key (in a JSON style) when
'setting' data. Typically the name of the db table will be used here,
but this method allows that to be overridden.
Current name.
Set the instance's name
Self for chaining
Name to set
Get the current set
property for the field.
Set configuration
Set the field's set
configuration.
A field can be marked as read only using this option, to be set only during an create or edit action or to be set during both actions. This provides the ability to have fields that are only set when a new row is created (for example a "created" time stamp).
Self for chaining.
Set flag.
Get join table name.
Please note that this will also set the name used by the Join as well. This is for convenience as the JSON output / HTTP input will typically use the same name as the database name. If you want to set a custom name, the name method must be called after this one.
Join table name
Set column join name
Self for chaining
Join table name
Get the array of conditions applied to the method.
Knex where conditions.
Where condition to add to the query used to get data from the database. Note that this is applied to the child table.
Self for chaining.
Knex query condition
Generated using TypeDoc
The MJoin class provides a one-to-many join link for Editor. This can be useful in cases were an attribute can take multiple values at the same time - for example cumulative security access levels.
Typically the MJoin class should be used with a link table, but this is optional. Please note that if you don't use a link table you should be aware that on edit the linked rows are deleted and then reinserted, thus if any values should be retained they should also be submitted.
Please refer to the Editor Node documentation for further information https://editor.datatables.net/manual/node
Export