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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mglaman’s picture

Status: Active » Needs review
FileSize
390 bytes

Here is a patch

Status: Needs review » Needs work

The last submitted patch, 1: 2336417-1.patch, failed testing.

mglaman’s picture

Status: Needs work » Active

Ignore my patch. I'm silly. That's the entity form, not the complex widget.

dcam’s picture

Status: Active » Closed (outdated)

I'm closing old IEF support issues. Please feel free to re-open the issue if you still require assistance.