Skip to content
This repository was archived by the owner on Apr 17, 2024. It is now read-only.

Commit fb4cd7e

Browse files
author
Mateu Aguiló Bosch
committed
feat: add link for the GraphQL description
This will allow people to discover https://github.com/contentacms/contentajs-graphql more easily.
1 parent 17dd080 commit fb4cd7e

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

src/Plugin/Contenta/OptionalModule/ContentaGraphQL.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
namespace Drupal\contenta_jsonapi\Plugin\Contenta\OptionalModule;
44

55
use Drupal\Core\Form\FormStateInterface;
6+
use Drupal\Core\Link;
7+
use Drupal\Core\Url;
68

79
/**
810
* GraphQL.
@@ -23,12 +25,18 @@ public function buildForm(array $form, FormStateInterface $form_state) {
2325

2426
$form = parent::buildForm($form, $form_state);
2527

28+
$link = Link::fromTextAndUrl(
29+
'GraphQL integration in Contenta JS',
30+
Url::fromUri('https://github.com/contentacms/contentajs-graphql')
31+
)->toString();
2632
$form['contenta_graphql']['project_info'] = [
2733
'#type' => 'item',
28-
'#description' => $this->t("Contenta CMS is primarily focused on JSON API.
29-
If you want to expose a GraphQL API consider looking at the GraphQL
30-
integration in Contenta JS. If you still want to install GraphQL inside
31-
of Drupal select this module."),
34+
'#description' => $this->t(
35+
"Contenta CMS is primarily focused on JSON API. If you want to expose a
36+
GraphQL API consider looking at the @link. If you still want to
37+
install GraphQL inside of Drupal select this module.",
38+
['@link' => $link]
39+
),
3240
];
3341

3442
return $form;

0 commit comments

Comments
 (0)