I made a custom entity with a date field stored as datetime in mysql.
I see the proper output in my content, and all other field values in my views except the datetme value. Only the label is shown. So I believed that I have to write a getter callback because of this:
getter callback: (optional) A callback used to retrieve the value of the property. Defaults to entity_property_verbatim_get(). It is important that your data is represented, as documented for your data type, e.g. a date has to be a timestamp. Thus if necessary, the getter callback has to do the necessary conversion. In case of an empty or not set value, the callback has to return NULL.
Question is how to use it? Apparantly I have to get a timestamp from a datetime field!???
Another one mentioned that views doesn't relate to property_info():
Getter and Setter callbacks are used only by entity metadata wrappers, not Views.
So my code looks like this atm:
$info['pricedefault']['properties']['preis_zeitraum_von'] = array( 'label' => t('Start period'), 'description' => t('Preis Zeitraum von'), 'type' => 'date', 'schema field' => 'preis_zeitraum_von', );
So it makes no sense to add a getter callback??? Or do I have to make my own views entity controller class?
ATM I'm very confused. Can anybody explain how to proceed?
THX in advance