Orthogonal editor php
Orthogonal editor php
belu
Posts: 38Questions: 14Answers: 0
Hi there,
Is there a php function in editor to provide orthogonal data?
If not, would it be possible to provide a subarray instead of the value for a field?
Providing the different data types in php would be mich easier for me, because I have already many of the needed functions... how do you handle this „problem“?
Thx!
Bernhard
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Perhaps you could explain what you are looking to do please? The orthogonal data is handled on the client-side by a rendering function.
Allan
yeah - fortunately I got that so far ;-) Sorry for being not detailed enough!
It would be nice, if there was also the possibility to provide the orthogonal data already with the JSON string. e.g.
So I was wondering, if there was a function in the server side .php (Editor-class) to
provide this data structure. So all the data manipulations would be made in php instead of JS. In this case JS render would be only used to assign the right fields from the JSON string to the different functionality (display, sort,export), but not to calculate the values.
I hope this is a little clearer explained!
thx an best regards,
Bernhard
Hi Bernhard,
Thanks - I think I see what you mean. You want to be able to do the rendering on the server-side rather than the client-side, and tell the client-side to use that data?
Yes that is something that should be possible:
basically it will fetch the same field twice and use a formatting function on the second. Personally I'd prefer to do it at the client-side as it will reduce the payload size and the amount of processing that the server has to do.
Regards,
Allan
Ok thanks allan!
In between I wrote a own class, that produces the JSON format I wrote in the post above. Now there is a problem with using editor, because on update editor says [[object object]] in the date field. Is there also something like the render function in Datatables for editor? I mean a function, that lets me tell editor, which field of the JSON string should be chosen for displaying the data?
thx again!
thanks, I solved it by assigning the following at editor:
name: "table_alias.column_name.default",
best regards!