$build['top'
]['actions'
]['enable'
] =
[ '#type' => 'submit',
'#value' =>
$this->
t('Enable @display_title',
['@display_title' =>
$display_title]),
'#limit_validation_errors' =>
[],
'#submit' =>
['::submitDisplayEnable', '::submitDelayDestination'
],
'#prefix' => '<li class="enable">',
"#suffix" => '</li>',
];
} // Add a link to view the page unless the view is disabled or has no
// path.
elseif ($view->
status() &&
$view->
getExecutable()->displayHandlers->
get($display['id'
])->
hasPath()) { $path =
$view->
getExecutable()->displayHandlers->
get($display['id'
])->
getPath();
if ($path && (!
str_contains($path, '%'
))) { // Wrap this in a try/catch as trying to generate links to some
// routes may throw a NotAcceptableHttpException if they do not
// respond to HTML, such as RESTExports.
try { if (!
parse_url($path, PHP_URL_SCHEME
)) { // @todo Views should expect and store a leading /. See:
// https://www.drupal.org/node/2423913
$url = Url::
fromUserInput('/' .
ltrim($path, '/'
));
}