Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
graphql_compose
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
graphql_compose
Merge requests
!91
3462514 Support for Link Attributes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
3462514 Support for Link Attributes
issue/graphql_compose-3462514:2.2.x
into
2.2.x
Overview
1
Commits
2
Pipelines
2
Changes
5
Closed
Ronald Aguilar
requested to merge
issue/graphql_compose-3462514:2.2.x
into
2.2.x
10 months ago
Overview
1
Commits
2
Pipelines
2
Changes
5
Expand
Adding support for Link Attributes.
0
0
Merge request reports
Compare
2.2.x
version 1
e9d7efee
10 months ago
2.2.x (base)
and
latest version
latest version
cba9dc0d
2 commits,
10 months ago
version 1
e9d7efee
1 commit,
10 months ago
5 files
+
172
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
modules/graphql_compose_linkattributes/src/Plugin/GraphQLCompose/SchemaType/LinkAttributes.php
0 → 100644
+
69
−
0
Options
<?php
declare
(
strict_types
=
1
);
namespace
Drupal\graphql_compose_linkattributes\Plugin\GraphQLCompose\SchemaType
;
use
Drupal\graphql_compose
\Plugin\GraphQLCompose\GraphQLComposeSchemaTypeBase
;
use
GraphQL\Type\Definition\ObjectType
;
use
GraphQL\Type\Definition\Type
;
/**
* {@inheritdoc}
*
* @GraphQLComposeSchemaType(
* id = "LinkAttributes",
* )
*/
class
LinkAttributes
extends
GraphQLComposeSchemaTypeBase
{
/**
* {@inheritdoc}
*/
public
function
getTypes
():
array
{
$types
=
[];
$types
[]
=
new
ObjectType
([
'name'
=>
$this
->
getPluginId
(),
'description'
=>
(
string
)
$this
->
t
(
'Link item attributes set within the CMS.'
),
'fields'
=>
function
()
{
$fields
[
'id'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The ID of the link.'
,
];
$fields
[
'name'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The name of the link.'
,
];
$fields
[
'title'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The title of the link.'
,
];
$fields
[
'target'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The target of the link.'
,
];
$fields
[
'rel'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The rel of the link.'
,
];
$fields
[
'class'
]
=
[
'type'
=>
Type
::
listOf
(
Type
::
string
()),
'description'
=>
'The classes of the link.'
,
];
$fields
[
'accessKey'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The accesskey of the link.'
,
];
$fields
[
'ariaLabel'
]
=
[
'type'
=>
Type
::
string
(),
'description'
=>
'The aria_label of the link.'
,
];
return
$fields
;
},
]);
return
$types
;
}
}
Loading