How to alter variable for ECK entity? We are using the ECK module where we have created component eck_highlight (machine name). How would we be able to modify the variable array using a preprocess hook?

Eck_highlight component has this field:


Field Reference to content types: basic, article, and event


Goal: 

Call the preprocess to store 'info' array to vars (i.e. vars['info']). The info variable will be passed into the Twig template so we can use to output information. 

mymodule_preprocess_eck_highlight(&amp;$vars) {
    $vars['info'] += [
       'id' =&gt; 'some-id',
       'height' =&gt; 'some-height',
       'width' =&gt; 'some-width',
       'src' =&gt; 'src1'
    ];
}


We have tried to do the following but cannot alter the variables. 


mymodule_preprocess_eck_highlight(&amp;$vars) 
mytheme_preprocess_eck_highlight(&amp;$vars)
I am adding an answer so anyone who comes across this that i was able to resolve the issue. I had to use mymodule_preprocess_eck_entity(&amp;$vars). 

When i tried to use the machine name in place of eck_entity, it did not work.