Problem/Motivation
When using a hook_preprocess_entity_comparison_link, it is not possible to alter the link because it is already generated.
Steps to reproduce
/**
* Implements hook_preprocess_HOOK().
*/
function foo_preprocess_entity_comparison_link(&$variables) {
$link = $variables['output'];
// Can't do anything with it.
}
Proposed resolution
template_preprocess_entity_comparison_link() should use toRenderable() instead of toString().
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | entity_comparison-3197691-2.patch | 463 bytes | prudloff |
Comments
Comment #2
prudloff commentedThe attached patch uses
toRenderable().Comment #4
lobodakyrylo commentedComment #5
lobodakyrylo commented