Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_cfg_common
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_cfg_common
Commits
750feb53
Commit
750feb53
authored
3 years ago
by
Eric Bremner
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-5195: fixing up contact to use new node theming
parent
1617c275
No related branches found
No related tags found
1 merge request
!172
Feature/istwcms 5128 ebremner theme node services
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Service/UwNodeContent.php
+41
-16
41 additions, 16 deletions
src/Service/UwNodeContent.php
with
41 additions
and
16 deletions
src/Service/UwNodeContent.php
+
41
−
16
View file @
750feb53
...
...
@@ -437,22 +437,47 @@ class UwNodeContent {
*/
public
function
getContactContent
(
array
$node_flags
):
array
{
return
[
'title'
=>
$node_flags
[
'get_title'
]
?
TRUE
:
NULL
,
'position'
=>
$node_flags
[
'get_header'
]
?
'field_uw_ct_contact_title'
:
NULL
,
'affiliation'
=>
$node_flags
[
'get_header'
]
?
'field_uw_ct_contact_affiliation'
:
NULL
,
'image'
=>
$node_flags
[
'get_image'
]
?
'field_uw_ct_contact_image'
:
NULL
,
'content'
=>
$node_flags
[
'get_content'
]
?
'layout_builder__layout'
:
NULL
,
'email'
=>
$node_flags
[
'get_footer'
]
?
'field_uw_ct_contact_email'
:
NULL
,
'location'
=>
$node_flags
[
'get_footer'
]
?
'field_uw_ct_contact_location'
:
NULL
,
'phone'
=>
$node_flags
[
'get_footer'
]
?
'field_uw_ct_contact_phone'
:
NULL
,
'additional_info'
=>
$node_flags
[
'get_footer'
]
?
'field_uw_ct_contact_info'
:
NULL
,
'link_profile'
=>
$node_flags
[
'get_footer'
]
?
'field_uw_ct_contact_link_profile'
:
NULL
,
'personal_webpage'
=>
$node_flags
[
'get_footer'
]
?
'field_uw_ct_contact_link_persona'
:
NULL
,
'contact_for'
=>
$node_flags
[
'get_footer'
]
?
'field_uw_ct_contact_contact_for'
:
NULL
,
'groups'
=>
$node_flags
[
'get_footer'
]
?
'field_uw_ct_contact_group'
:
NULL
,
'url'
=>
TRUE
,
];
// Get the content data.
$content_data
=
$this
->
setupContentData
(
$node_flags
);
// Setup the header content.
if
(
$node_flags
[
'get_header'
])
{
$content_data
[
'header'
][
'position'
]
=
$this
->
addToContentData
(
'plain_text'
,
'field_uw_ct_contact_title'
);
}
// Setup the actual content.
if
(
$node_flags
[
'get_content'
])
{
$content_data
[
'content'
]
=
$this
->
addToContentData
(
'content'
,
'field_uw_news_summary'
);
}
// Get the footer data.
if
(
$node_flags
[
'get_footer'
])
{
// Get the additional info.
$content_data
[
'footer'
][
'additional_info'
][
'has_children'
]
=
TRUE
;
$content_data
[
'footer'
][
'additional_info'
][
'info'
]
=
$this
->
addToContentData
(
'formatted_text'
,
'field_uw_ct_contact_info'
);
// Get the contact information.
$content_data
[
'footer'
][
'contact_info'
][
'has_children'
]
=
TRUE
;
$content_data
[
'footer'
][
'contact_info'
][
'email'
]
=
$this
->
addToContentData
(
'plain_text'
,
'field_uw_ct_contact_email'
);
$content_data
[
'footer'
][
'contact_info'
][
'phone'
]
=
$this
->
addToContentData
(
'plain_text'
,
'field_uw_ct_contact_phone'
);
$content_data
[
'footer'
][
'contact_info'
][
'location'
]
=
$this
->
addToContentData
(
'plain_text'
,
'field_uw_ct_contact_location'
,
'Location'
);
// Get the links for the profile.
$content_data
[
'footer'
][
'links'
][
'has_children'
]
=
TRUE
;
$content_data
[
'footer'
][
'links'
][
'profile'
]
=
$this
->
addToContentData
(
'link'
,
'field_uw_ct_contact_link_profile'
,
'Link to profile'
);
$content_data
[
'footer'
][
'links'
][
'webpage'
]
=
$this
->
addToContentData
(
'link'
,
'field_uw_ct_contact_link_persona'
,
'Link to personal webpage'
);
// Get the contact for, for the profile.
$content_data
[
'footer'
][
'contact_for'
][
'has_children'
]
=
TRUE
;
$content_data
[
'footer'
][
'contact_for'
][
'contact'
]
=
$this
->
addToContentData
(
'plain_text'
,
'field_uw_ct_contact_contact_for'
);
// Get the groups for the profile.
$content_data
[
'footer'
][
'groups'
][
'has_children'
]
=
TRUE
;
$content_data
[
'footer'
][
'groups'
][
'groups'
]
=
$this
->
addToContentData
(
'terms'
,
[
'field_uw_ct_contact_group'
]);
}
return
$content_data
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment