Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a test module called demo. I creaated a custom entity called project. I have implemented hook_entity_property_info() which works with views as it should atm and looks like this:
function demo_entity_property_info() {
$info = array();
$info['project']['properties']['id'] = array(
'label' => t('Project ID'),
'description' => t('The ID of the project.'),
'type' => 'integer',
'schema field' => 'id',
);
$info['project']['properties']['name'] = array(
'label' => t('Project name'),
'description' => t('Name of the project.'),
'type' => 'text',
'schema field' => 'name',
);
$info['project']['properties']['description'] = array(
'label' => t('Project description'),
'description' => t('Description of the project.'),
'type' => 'text',
'schema field' => 'description',
);
$info['project']['properties']['deadline'] = array(
'label' => t('Deadline'),
'description' => t('Project deadline.'),
'type' => 'date',
'schema field' => 'deadline',
);
return $info;
}
Now I want to get these fields in my inline entity form.
Therefore as it is written in the form.api.php I have to use hook_inline_entity_form_table_fields_alter(&$fields, $context).
I do it like this:
function demo_inline_entity_form_table_fields_alter(&$fields, $context) {
$new = $fields;
$bla = $context;
$bla1 =$new;
$bla2 = $$bla;
}
to get my xdebug on the trail. But it doesn't work. So there are no fields to write.
What is my fault? What do I wrong?
Thx in advance
maen
Comment | File | Size | Author |
---|---|---|---|
#1 | 2336417-1.patch | 390 bytes | mglaman |
Comments
Comment #1
mglamanHere is a patch
Comment #3
mglamanIgnore my patch. I'm silly. That's the entity form, not the complex widget.
Comment #4
dcam CreditAttribution: dcam as a volunteer commentedI'm closing old IEF support issues. Please feel free to re-open the issue if you still require assistance.