-
-
Notifications
You must be signed in to change notification settings - Fork 612
Closed
Description
Hi! I'm trying to transform specific columns of a table:
Given there are following flights available:
| from_airport | to_airport | from_date | to_date |
| CDG | JFK | +93 days | +98 days |
| CDG | JFK | +93 days | +98 days |To my understanding, its is possible to transform an entire table, but it is not possible to create a transformer for a specific column name, correct?
I understand that transformers should be called on each "cell" of the table, and the following should work:
Given there are following flights available:
| from_airport | to_airport | from_date | to_date |
| airport CDG | airport JFK | +93 days | +98 days |
| airport CDG | airport JFK | +93 days | +98 days |With this Transformer:
/**
* @Transform airport :airport
* @Transform /^airport ([A-Z]{3})$/
*/
public function transform(string $iataCode): AirportInterface
{
// do stuff
}But it doesnt work. Any help would be much appreciated!
Reactions are currently unavailable