comparison core/modules/comment/src/Form/CommentAdminOverview.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
213 'posted_in' => [ 213 'posted_in' => [
214 'data' => [ 214 'data' => [
215 '#type' => 'link', 215 '#type' => 'link',
216 '#title' => $commented_entity->label(), 216 '#title' => $commented_entity->label(),
217 '#access' => $commented_entity->access('view'), 217 '#access' => $commented_entity->access('view'),
218 '#url' => $commented_entity->urlInfo(), 218 '#url' => $commented_entity->toUrl(),
219 ], 219 ],
220 ], 220 ],
221 'changed' => $this->dateFormatter->format($comment->getChangedTimeAcrossTranslations(), 'short'), 221 'changed' => $this->dateFormatter->format($comment->getChangedTimeAcrossTranslations(), 'short'),
222 ]; 222 ];
223 $comment_uri_options = $comment->urlInfo()->getOptions() + ['query' => $destination]; 223 $comment_uri_options = $comment->toUrl()->getOptions() + ['query' => $destination];
224 $links = []; 224 $links = [];
225 $links['edit'] = [ 225 $links['edit'] = [
226 'title' => $this->t('Edit'), 226 'title' => $this->t('Edit'),
227 'url' => $comment->urlInfo('edit-form', $comment_uri_options), 227 'url' => $comment->toUrl('edit-form', $comment_uri_options),
228 ]; 228 ];
229 if ($this->moduleHandler->moduleExists('content_translation') && $this->moduleHandler->invoke('content_translation', 'translate_access', [$comment])->isAllowed()) { 229 if ($this->moduleHandler->moduleExists('content_translation') && $this->moduleHandler->invoke('content_translation', 'translate_access', [$comment])->isAllowed()) {
230 $links['translate'] = [ 230 $links['translate'] = [
231 'title' => $this->t('Translate'), 231 'title' => $this->t('Translate'),
232 'url' => $comment->urlInfo('drupal:content-translation-overview', $comment_uri_options), 232 'url' => $comment->toUrl('drupal:content-translation-overview', $comment_uri_options),
233 ]; 233 ];
234 } 234 }
235 $options[$comment->id()]['operations']['data'] = [ 235 $options[$comment->id()]['operations']['data'] = [
236 '#type' => 'operations', 236 '#type' => 'operations',
237 '#links' => $links, 237 '#links' => $links,