Skip to content
Snippets Groups Projects

Issue #3422141: use valid URI for active handler view field rendering

Closed Frank Mably requested to merge issue/maestro-3422141:3422141-fix-rendering into 3.x
@@ -2,6 +2,7 @@
namespace Drupal\maestro\Plugin\views\field;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Form\FormStateInterface;
use Drupal\maestro\Utility\TaskHandler;
use Drupal\views\Plugin\views\field\FieldPluginBase;
@@ -84,10 +85,11 @@ class MaestroEngineActiveHandler extends FieldPluginBase {
$taskhandler = TaskHandler::getHandlerURL($queueID);
if (isset($this->options['show_as_link']) && $this->options['show_as_link'] == 1) {
$uri = UrlHelper::isExternal($taskhandler) ? $taskhandler : 'internal:' . $taskhandler;
$build['handler'][$queueID]['execute'] = [
'#type' => 'link',
'#title' => isset($this->options['link_text']) ? $this->options['link_text'] : $this->t('Link'),
'#url' => Url::fromUri($taskhandler),
'#url' => Url::fromUri($uri),
];
}
else {
Loading