Skip to content
Snippets Groups Projects
Commit fab76ca4 authored by Benjamin Melançon's avatar Benjamin Melançon
Browse files

Issue #3471669 by mlncn: Use Single Directory Component for button

parent 5bc76625
No related branches found
Tags 8.x-1.21
No related merge requests found
......@@ -37,12 +37,13 @@ class CreateReferencingContentButton extends ExtraFieldPlusDisplayBase {
$url = base_path() . 'node/add/pece_annotation?edit[field_annotation_artifact][widget][0][target_id]=' . $entity->id();
$build = [
'#type' => 'inline_template',
'#template' => '',
'#context' => [
'#type' => 'component',
'#component' => 'create_referencing_content:create-referencing-content-button',
'#props' => [
'url' => $url,
'label' => $this->t('Annotate'),
'tooltip' => $this->t('Create new Annotation content referencing this :content_type', [':content_type' => $content_type]),
'classes' => ['button is-primary is-medium'],
],
];
return $build;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment