how to use getFormatter with Mjoin
how to use getFormatter with Mjoin
ziv@kpmbro.com
Posts: 73Questions: 28Answers: 4
Hi Allan.
I want to add some data to a string on the sever side.
the field is using the Mjoin and i want to combine the result with getFormatter
my code :
$this->editor_instance->join(
Mjoin::inst( '42matters_ios' )
->link( 'offers_main_table.id', '42matters_connection.offer_id' )
->link( '42matters_ios.id', '42matters_connection.42_id')
->order( 'artworkUrl512 asc' )
->fields(
Field::inst( 'id' )
->options( '42matters_ios', 'id', 'artworkUrl512' ),
Field::inst( 'artworkUrl512' )->getFormatter( function ( $val ) use ($value) {
return "xxxx";
}));
)
);
Thanks
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
That should be all that is needed. Can you show me the JSON that is being returned from the server please?
Thanks,
Allan
no need its working thanks Allan.