M\á:l‹°;ZfbJôØèÞ®^—X£ß(qª·vÓIÍnÛ³séRÈEÜ]ð>
§#~å�ŸØj±Æ,ŸH>‹ôbç
àØ#hÏ#* Ç“-Gס˜ÕH°,ª”äUÃD” š�èþjUÈ´|©C#—ñ0"ñª‰
é¼KæE¢]†áV�nÛ]J·›Sý4C?´?Gšv«`*ÁÑ2ö+m*ÿ’ï(ó²çÍ>¹yÑÂcjLzðLh=Z<ÞVj´Vð:léàBÅ�õ}L9þ<Ͱ)ÜîÂþ"Gîáð$Švg5 D^Š>°³æK>_Mㄆ§ãÀÍâ�¥\ÇA+ ë–¼RßíVb¿O1@Í\³4¿‡8äÍಬzôü„"¾àcšõô`ù»†„Àµê0¤õGó)ÏÜòCË4ML,zX—�ðÂZK~É«‡§î;-Ýã[OÌ-߀ÑoD:LÜ#Ķ48Ñ
ª�µ¬òL�9DÆ]†ƒC¸;>|f€•lQŽâ±ÑIx¦:"¬y®÷®�Àºâ
ºî†yw\G8�¼Á�ʧ#-W¦³ÖÑ,ªJ´³õ€DeÖ#ß ÙXù�7Z¯�!Ö%eMÐ@ÕÂå¡m¥™©½˜öâþϨÉi±G’xÜÛ«Á€¡tWøÙÞb7‹¿W
„ø°çL²©*â°É86 \G8�¼Á�ʧ#-W}.¯£ß¬yª¾y•/Iç?ÅØå
Bb,Ø0z¢Æñ]A¯\ñ/øÌMÈÌ5�0Ö%‡ˆ 6‰è]¼è[zÆI-JtWøÙÞb7‹¿W
„øî�€”Ôú/ÇÅÁ7k[q5âÀå¿hšÏÝÊåEa3qQå' ÍÄf‰�1¥n õVχ¦7À,¤çqq<½'féœË·«·Ø¾É4`§p©Þœþõ¹(«Bÿ™t`ˆ éRjឣMª¬rD„$ÅÈQwè‘FN¡‚(ÏK #vxÒ»ÑøÚŸ*®‘aæúòÚ!�ÚÍÔhý±9;-°î–3ïø0[ÅÖ;—a»z�±ßo¾0K‹›FfÙH·Ü&Áº™ @0DŒlBm–î&´0%oд>Òp‹!Âò iÿñ†Á�œîÁˆ[M’ü$`ûrñu‘ñ ár¹ô(Ë5�IRdšÎPT†^Ä.±
ì˜Ðû©1adÊõ"˜mŒQÖzBÃc÷ÞÓÖ mËF3äÝè#±ƒ`HÂÞõ…û¿›�H¤·5l£Fƒˆ/šÁDT ãÿe;xé¿ÆzUjÙ(ºPjrÿ-xB½Qðª_\W‚?'£ÜÝ:!D¸M¦ú5o¢!ª±&H-º×
ËØòã´ž·w$èH3«Fe¨·dÎN‹Î©�FÝ\}ˆ\ÊXCƒB@�íS°PÝÒ„±ú��õÅ"ó…@ožØ?‰ùæÏæ%‰À|“Ry›��&楼ÈÄ©øß]é!ÌÍε<W´UyÍW¨W¾pLýT 6UYh¶¥gÃp苉íâNf¬i
�ö¯J^pËoH}OlCÂ&cá|aOa=£½¤5?bŒ�ý
JÎ%B�McÖÙIm
#ãìcíÃ$Ľ££ÄŽæŽ${€Œtãkf†“HA°ÃòEdw�*ØÕ·¬ŒÃ^qŸÀdj†¦8ãö.ø—'„sŠðx0ÈøÄlj~¼ÎACÒ—¿€y�+Ò½‰áf>ïÒcµÌÖI
ï+¿EòŸ”]&LØ{ìš0V˜Šu¹Ô€z»¯^½±.øûvàï}a#ñšÌø)
P� &Ô
Â,‡¶, ¥”öö“P…2·!Õ<±üÏŸ:fy7-ÎN‹Î©�FÝ\}ˆ\ÊXCúñ%?À»n¶�>· éä\Èüw8)”Pú‰3qü“µ>ïÒcµÌÖI
ï+¿EòŸ”]&LØ{ìš0V˜Šu¹Ô€z»¯^½±.øûvàïµÉáÈø/pX€LGF×’
9ÇKßJ…ò�i‰‡áK/¨ {1•ýFf^E2ÿöÑN³ïµd�
¯õÒ,0ˆ‘¡¿–Ð.ìº÷�‘p&¬t¬ÖÆòôtl”¨b‘\ßA¢g
0ëë?rÜ
¸9„×úryô2¨ ŠŠI¡]—n¯ß0>wy{ ”$`•ý
G$Ht¹„{dzë¸Í‘‰rö0ª®ï`NwÙð�i�’È(ÚP“çV¾Š½¹f5½«¨®žö¤XpogÕÈñ¸óÆàk�ê’ÄP)Ÿ'Á_kKÌËêQ}²KÈ—ËÞ5¸C`£È�Âå4÷‘‹¶Y~ßs:#ÖQ5üð’ûxëlÞÅY9„ðžXL£úuéûYr/sšx'ºñ8ôõ.¸�f‰EC5yÅàħ‚9_øí‡ê†@ÅP¹¡Äº»°/JŒÑ‡™!e`Yš¿Û"µÕ—:<{ªü%ÿˆÝÒ§jÖGh°,>#ßñhœÚkØi{%0¹ë WDy mÏó0àx7(·Óž’†Ò…Ø=ë–ZÀclì.æýòîàØWó›ìÊÏLDzt±^f€•lQŽâ±ÑIx¦:"¬y®÷®�Àºâ
ºî†yw,1Ö-Ãm}OãQüŒ>šk§˜)…4óuá‚‚¤Ñ@.‡vÀÿѽ»3¤¾VÊŸB™èê^7ã&‘4ÏC%ýDÍ«hÂÿSë‰4ÜîÈ?U/¢ÇKù‡,…qXu0ïI™/UŽÍ6®BqQY4F‡n'þm>«ôd&y!oè©ÒäD·˜aðÔCê&¨‘Óq£F»ê °h·2ÎZùÆDmAðOð2é=ºrÖÆòôtl”¨b‘\ßA¢Q{ÓÑ¡2qP¡~:Y:eYvÅÒÝ(Ãù“�=�\â‹ uh÷Ú@ˆW»(žÀ»¶\
ÛXw;ÔæC[_F§8T.q£æ:’aø‡WEýÊ ¶?þ)òBŸ+ñ»ªiœ~k(öC=¿Ò�ã6;AV"›˜_2qc˜¡©{Ñb$3½+†{Ãh³¥‰™ås²pì\G©\úš-z»n© Ê¥ðDìn|=A8±eKÒíkDšÊ¥{Ñг�¬8`ØB{’žcb:?³ Øê½ª8šê$»¹ŒFÇÊ ^ ªÁ¿ª¹“íyÕ1NDRBöHƒ„þüáÿIßl+ܳaº åÚÞ;Zi”-s!꣟«‘ºË##”ôך ïñ§[F*G]uô%*“„Š{¤úؿݘ¦ïl·äáÇ‚2¥»‘¶„&Ç@Ê*D�QǶºdâDGˆ �PnqéÇùVOÅÃ^O³ôwARñ@‡‡l»"èYë\ ð³5^žô5»�lú€âUÑÑÉÐáÙùn¡c׆rG*?=Š%¤D~ĹðUP§öˆ&^FüA¦t²%,ŠŽ-gY1ÃÎù+€õóǹT<“%Ôº]ŠuU›°xÎä¨QÎPCéIB?ôÃÁ sä§ä!*¹¹6"SEÜ´}œëhТGÅü‰üôtÁ{´! ý±óߦ€B(Y}"2xŸOß뛲‹’KXÖƒ 8^†>Žþ÷JCKÕ:Ml&£)nÿFû¨•aÀ
šãøv¯È÷�³�
²æ(¡MÛŽv®â8}à6¾%„ä÷
©7œÄJo¾§nXc®Öx¶±`"ð#Íä‹,EøxJª‡ëc¤ý`ð]£¿XvŽ!ÌFˆ¢gPmìfv�Ët,{!¼§±À¬ãµÜ¤)–‰L—?M»ÝØ:6ÍŸ^j‘Ä‹[Ò R¶t½‚8Æ47,^¡ƒNŠ
#´Íw»S×ñJ
Þ»×M=‰³o,kšžÑ 3ûxxw7'Ç tc2³Ad›û€dm¾ÃÊùϱHˆL5¦{-–ª7MŒz–:‚ñƒzXû\´ïGªÇ¼´Y{æÙ{yZŽîß©½\—÷Pðx_¾à‡‚ÝrxTϸÕV¨.>g#Öbùê°O;Gæ8‹ôŒ4Û™«¶ófסìφ/ã^X1jðHo¬Oð1"ÝÝ�£Ìéó�_S
fÍDl x‘åËØ³d´ }¸©ë³Ã.ËàJ ý>ètÐ#V’¤˜‹µdˆ¹S¦+Ä¿¸1D—qzá<ô¦Ð~ŒØ—hVyi˜°bpA•;
6ÝoÇvuKˆ¡¾Uà{OÀ
e‡.Ã6õí~ñý8L=h
ÿžDĺhT±zùb(9'Nò³¤p0•)Æ´“›íÏÑ$C))²_Czªb±!ôÆ M¤/$¸F>/wÞ(üûmõ’ªFp¬á¦’\Ø‹€ïÑ‹ÃÆÌÖîfÓ¬LE¬dšëÜg<Ï\½è—–Ï
ö,U—âg_ùzPr÷î/¥"€›šÞ¨t'ùGL9gìÜ–cßD{Oþ¾më¡µŽ¹‘“W;Qe|英QC•?ÿÁ°yk’ìßÑúTcÉ4ßóY”C‰&0óÉõ®¤•ÆÊsÚÓÈv50+\à{4Ãõ¹jñ¾Ôrâ/þÆ%H¾±ÉÆ÷"º›S>]üƧ”8>=�Òá
*˜Lëø°á]+Å"÷éÞî™å¦VöY�Uš´wåùß•t}ÕÆ¹ÈA²ééŸÄ^*\e>|è·ÜµÜ&ËÀ·PÝ%Íü¶n™Úæë‰4Ü|SÍÕ[shŒ_%�U×ѱGôÅu„ªû ®6)€8q¬fÆ š×Y¬¤äÙfNx#¸ü+Z�“ƒî36Ãî=�/Q®ñˆûJòÄ…²Ò¹63×
’¥õ¤ïݹžÂž…ÄŠ~ ½Æ*ik~á^‡>¶«¾lD+ù»øÅ¯o«ºr]ykŸ´¼�”«FÂ�ÇôeT–gA_ÔhõÙ—‰,»ÀY^�ÆMO0)XNG*Y{IP.ŠiÜštäã%$©;5vx OŒá�~‰�8'YZ¿4ê‰ðtsnž‚9u>Z|ßÍLN…í°µ‰ïp1}?ú(ÔžÃjªj¾bê«ü)õ°Cp]ÇjÉð/°H´Ò€ÔrQH)Òd‰€ËZöd¶¤´~QüXég]‘y+ª•Eƒ¡\÷l99G·Rºû®¾ƒçŽCó’`$Y�Ќ♀%Ù;ëAÑ¡0*0’„Ú%éĹ63×
’¥õ¤ïݹžÂž…ÄŠ~ ½Æ*ik~`�ŠíâMûU‘â1âîËå 4
‰ä°ÍäÈÞ!üçææï3ÃnšIÍçÜAE²Çvš-˜o•èð*è]van> )
->field(
Field::inst( 'id' )->validator( 'Validate::required' ),
Field::inst( 'name' )
)
Example:
Single row join - here we join the parent table with a single row in
the child table, without an intermediate link table. In this case the
child table is called extra and the two fields give the columns that
Editor will read from that table.
Methods summary
public
|
#
__construct( string $table = null, string $type = 'object' )
Join instance constructor.
Join instance constructor.
Parameters
- $table
- Table name to get the joined data from.
- $type
Work with a single result ('object') or an array of
results ('array') for the join.
|
public
string|DataTables\Editor\Join
|
#
aliasParentTable( string $_ = null )
Get / set parent table alias.
Get / set parent table alias.
When working with a self referencing table (i.e. a column in the table contains
a primary key value from its own table) it can be useful to set an alias on the
parent table's name, allowing a self referencing Join. For example: SELECT p2.publisher FROM publisher as p2 JOIN publisher on (publisher.idPublisher = p2.idPublisher)
Where, in this case, publisher is the table that is used by the Editor instance,
and you want to use Join to link back to the table (resolving a name for example).
This method allows that alias to be set. Fields can then use standard SQL notation
to select a field, for example p2.publisher or publisher.publisher.
Parameters
Returns
|
public
DataTables\Editor\Field[]|DataTables\Editor\Join
|
#
field( DataTables\Editor\Field $_ = null )
Get / set field instances.
Get / set field instances.
The list of fields designates which columns in the table that will be read
from the joined table.
Parameters
Returns
See
|
public
DataTables\Editor\Field[]|DataTables\Editor\Join
|
|
public
boolean|DataTables\Editor\Join
|
#
get( boolean $_ = null )
Get / set get attribute.
When set to false no read operations will occur on the join tables.
Parameters
Returns
|
public
|
#
join( string|string[] $parent = null, string|string[] $child = null, string $table = null )
Get / set join properties.
Get / set join properties.
Define how the SQL will be performed, on what columns. There are
basically two types of join that are supported by Editor here, a direct
foreign key reference in the join table to the parent table's primary
key, or a link table that contains just primary keys for the parent and
child tables (this approach is usually used with a DataTables\Editor\Join::type() of
'array' since you can often have multiple links between the two tables,
while a direct foreign key reference will typically use a type of
'object' (i.e. a single entry).
Deprecated
Parameters
- $parent
Parent table's primary key names. If used
with a link table (i.e. third parameter to this method is given, then
an array should be used, with the first element being the pkey's name
in the parent table, and the second element being the key's name in
the link table.
- $child
Child table's primary key names. If used
with a link table (i.e. third parameter to this method is given, then
an array should be used, with the first element being the pkey's name
in the child table, and the second element being the key's name in the
link table.
- $table
- Join table name, if using a link table
Returns
Join This for chaining
|
public
DataTables\Editor\Join
|
#
link( string $field1, string $field2 )
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.
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:
- First time, creates a link between the Editor host table and a join table
- Second time creates the links required for a link table.
Please refer to the Editor Mjoin documentation for further details:
https://editor.datatables.net/manual/php
Parameters
- $field1
- Table and field name
- $field2
- Table and field name
Returns
Throws
Exception Link limitations
|
public
DataTables\Editor\Join
|
#
order( string $_ = null )
Specify the property that the data will be sorted by.
Specify the property that the data will be sorted by.
Parameters
- $_
- $order SQL column name to order the data by
Returns
|
public
String|DataTables\Editor\Join
|
#
name( string $_ = null )
Get / set 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.
Parameters
Returns
|
public
boolean|DataTables\Editor\Join
|
#
set( boolean $_ = null )
Get / set set attribute.
When set to false no write operations will occur on the join tables.
This can be useful when you want to display information which is joined,
but want to only perform write operations on the parent table.
Parameters
Returns
|
public
String|DataTables\Editor\Join
|
#
table( string $_ = null )
Get / set join table name.
Get / set join table name.
Please note that this will also set the DataTables\Editor\Join::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 DataTables\Editor\Join::name() method must be called after this one.
Parameters
- $_
- Name of the table to read the join data from
Returns
|
public
String|DataTables\Editor\Join
|
#
type( string $_ = null )
Get / set the join type.
The join type allows the data that is returned from the join to be given
as an array (i.e. working with multiple possibly results for each record from
the parent table), or as an object (i.e. working which one and only one result
for each record form the parent table).
Parameters
- $_
Join type ('object') or an array of
results ('array') for the join.
Returns
|
public
DataTables\Editor\Join
|
#
validator( string $fieldName, callable $fn )
Set a validator for the array of data (not on a field basis)
Set a validator for the array of data (not on a field basis)
Parameters
- $fieldName
Name of the field that any error should be shown
against on the client-side
- $fn
- Callback function for validation
Returns
|
public
string[]|DataTables\Editor\Join
|
#
where( string|callable $key = null, string|string[] $value = null, string $op = '=' )
Where condition to add to the query used to get data from the database.
Note that this is applied to the child table.
Where condition to add to the query used to get data from the database.
Note that this is applied to the child table.
Can be used in two different ways:
- Simple case:
where( field, value, operator )
- Complex:
where( fn )
Parameters
- $key
- Single field name or a closure function
- $value
- Single field value, or an array of values.
- $op
- Condition operator: <, >, = etc
Returns
|
public
boolean
|
#
whereSet( boolean $_ = null )
Get / set if the WHERE conditions should be included in the create and
edit actions.
Get / set if the WHERE conditions should be included in the create and
edit actions.
This means that the fields which have been used as part of the 'get'
WHERE condition (using the where() method) will be set as the values
given.
This is default false (i.e. they are not included).
Parameters
- $_
- Include (
true), or not (false)
Returns
boolean Current value
|