added ref link to notes
This commit is contained in:
@@ -5,6 +5,7 @@ dependencies:
|
|||||||
config:
|
config:
|
||||||
- field.field.paragraph.note.field_note
|
- field.field.paragraph.note.field_note
|
||||||
- field.field.paragraph.note.field_numero
|
- field.field.paragraph.note.field_numero
|
||||||
|
- field.field.paragraph.note.field_text_lien
|
||||||
- paragraphs.paragraphs_type.note
|
- paragraphs.paragraphs_type.note
|
||||||
module:
|
module:
|
||||||
- text
|
- text
|
||||||
@@ -28,6 +29,16 @@ content:
|
|||||||
third_party_settings: { }
|
third_party_settings: { }
|
||||||
type: number
|
type: number
|
||||||
region: content
|
region: content
|
||||||
|
field_text_lien:
|
||||||
|
weight: 2
|
||||||
|
settings:
|
||||||
|
match_operator: CONTAINS
|
||||||
|
match_limit: 10
|
||||||
|
size: 60
|
||||||
|
placeholder: ''
|
||||||
|
third_party_settings: { }
|
||||||
|
type: entity_reference_autocomplete
|
||||||
|
region: content
|
||||||
hidden:
|
hidden:
|
||||||
created: true
|
created: true
|
||||||
status: true
|
status: true
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ dependencies:
|
|||||||
config:
|
config:
|
||||||
- field.field.paragraph.note.field_note
|
- field.field.paragraph.note.field_note
|
||||||
- field.field.paragraph.note.field_numero
|
- field.field.paragraph.note.field_numero
|
||||||
|
- field.field.paragraph.note.field_text_lien
|
||||||
- paragraphs.paragraphs_type.note
|
- paragraphs.paragraphs_type.note
|
||||||
module:
|
module:
|
||||||
- text
|
- text
|
||||||
@@ -29,5 +30,13 @@ content:
|
|||||||
third_party_settings: { }
|
third_party_settings: { }
|
||||||
type: number_integer
|
type: number_integer
|
||||||
region: content
|
region: content
|
||||||
|
field_text_lien:
|
||||||
|
weight: 2
|
||||||
|
label: above
|
||||||
|
settings:
|
||||||
|
link: true
|
||||||
|
third_party_settings: { }
|
||||||
|
type: entity_reference_label
|
||||||
|
region: content
|
||||||
hidden:
|
hidden:
|
||||||
search_api_excerpt: true
|
search_api_excerpt: true
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
uuid: 5504d452-d5bf-480c-aeab-f73bf81d7db9
|
||||||
|
langcode: fr
|
||||||
|
status: true
|
||||||
|
dependencies:
|
||||||
|
config:
|
||||||
|
- field.storage.paragraph.field_text_lien
|
||||||
|
- node.type.texte
|
||||||
|
- node.type.texte_prod
|
||||||
|
- paragraphs.paragraphs_type.note
|
||||||
|
id: paragraph.note.field_text_lien
|
||||||
|
field_name: field_text_lien
|
||||||
|
entity_type: paragraph
|
||||||
|
bundle: note
|
||||||
|
label: 'Text lien'
|
||||||
|
description: ''
|
||||||
|
required: false
|
||||||
|
translatable: true
|
||||||
|
default_value: { }
|
||||||
|
default_value_callback: ''
|
||||||
|
settings:
|
||||||
|
handler: 'default:node'
|
||||||
|
handler_settings:
|
||||||
|
target_bundles:
|
||||||
|
texte: texte
|
||||||
|
texte_prod: texte_prod
|
||||||
|
sort:
|
||||||
|
field: _none
|
||||||
|
direction: ASC
|
||||||
|
auto_create: false
|
||||||
|
auto_create_bundle: texte
|
||||||
|
field_type: entity_reference
|
||||||
@@ -115,6 +115,8 @@ interface NoteInterface {
|
|||||||
type Noteref implements NoteInterface {
|
type Noteref implements NoteInterface {
|
||||||
note: String
|
note: String
|
||||||
numero: Int
|
numero: Int
|
||||||
|
#
|
||||||
|
liens: [TextInterface]
|
||||||
}
|
}
|
||||||
|
|
||||||
type Noteprod implements NoteInterface {
|
type Noteprod implements NoteInterface {
|
||||||
|
|||||||
+6
@@ -584,6 +584,12 @@ class EnFrSchemaExtension extends SdlSchemaExtensionPluginBase {
|
|||||||
->map('value', $builder->fromParent())
|
->map('value', $builder->fromParent())
|
||||||
->map('path', $builder->fromValue('field_numero.value'))
|
->map('path', $builder->fromValue('field_numero.value'))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$registry->addFieldResolver('Noteprod', 'liens',
|
||||||
|
$builder->produce('entity_reference')
|
||||||
|
->map('entity', $builder->fromParent())
|
||||||
|
->map('field', $builder->fromValue('field_text_lien'))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function addNoteProd(ResolverRegistryInterface $registry, ResolverBuilder $builder) {
|
protected function addNoteProd(ResolverRegistryInterface $registry, ResolverBuilder $builder) {
|
||||||
|
|||||||
Reference in New Issue
Block a user