⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

callbackColumn don't work on column setRelationNtoN



fredo2009

fredo2009
  • profile picture
  • Member

Posted 31 January 2018 - 08:12 AM

Hi,

 

$crud->setTable('events_inscrits');

$crud->setRelationNtoN('option', 'events_inscrits', 'events_inscrits', 'id', 'id', 'nom');
$crud->callbackColumn('option', function ($value, $row) {
                //return $this->_callback_colonnes_option($value, $row);
                return "pouetpouetpouet";
});

 

If I do not use the function callbackColumn, I have my field 'nom' wich is returned

But with this callbackColumn, I systematically primary key of my table which is retrouned

 

Maybe we can't use setRelationNtoN on unique table????

 

I use setRelationNtoN to add a column that does not exist in my table