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
76aac44f
Commit
76aac44f
authored
3 years ago
by
Eric Bremner
Committed by
Eric Bremner
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-4704: removing functions that are no longer required
parent
81bc913c
No related branches found
No related tags found
1 merge request
!112
Feature/istwcms 4704 m26lebla ebremner content types
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Service/UWService.php
+0
-98
0 additions, 98 deletions
src/Service/UWService.php
src/Service/UWServiceInterface.php
+0
-22
0 additions, 22 deletions
src/Service/UWServiceInterface.php
with
0 additions
and
120 deletions
src/Service/UWService.php
+
0
−
98
View file @
76aac44f
...
...
@@ -551,104 +551,6 @@ class UWService implements UWServiceInterface {
}
}
/**
* {@inheritDoc}
*/
public
function
uwGetHeaderData
(
Node
$node
):
array
{
// Array to hold the header data, need to set to
// null in case there are no header data to be
// returned.
$header_data
=
[];
// Get the header data, depending on the content type.
switch
(
$node
->
getType
())
{
case
'uw_ct_blog'
;
// Set the header data.
$header_data
=
[
'date'
=>
date
(
'l, F j, Y'
,
strtotime
(
$node
->
field_uw_blog_date
->
value
)),
'author'
=>
$this
->
uwGetAuthor
(
$node
),
'title'
=>
$node
->
getTitle
(),
];
break
;
case
'uw_ct_event'
:
// Get all the dates.
// @todo figure out what date to display.
$dates
=
$node
->
field_uw_event_date
->
getValue
();
// Set the header data.
$header_data
=
[
'date'
=>
date
(
'l, F j, Y'
,
$dates
[
0
][
'value'
]),
'title'
=>
$node
->
getTitle
(),
];
break
;
case
'uw_ct_news_item'
:
// Set the header data.
$header_data
=
[
'date'
=>
date
(
'l, F j, Y'
,
strtotime
(
$node
->
field_uw_news_date
->
value
)),
'title'
=>
$node
->
getTitle
(),
];
break
;
}
// Return the header data.
return
$header_data
;
}
/**
* {@inheritDoc}
*/
public
function
uwGetFooterData
(
Node
$node
):
array
{
// Array to hold the footer data, need to set to
// null in case there are no footer data to be
// returned.
$footer_data
=
[];
// Get the footer data, depending on the content type.
switch
(
$node
->
getType
())
{
case
'uw_ct_blog'
;
$tags
=
$this
->
uwGetTermsFromEntityField
(
$node
->
get
(
'field_uw_blog_tags'
),
'tags'
);
$audiences
=
$this
->
uwGetTermsFromEntityField
(
$node
->
get
(
'field_uw_audience'
),
'tags'
);
$footer_data
=
[
'tags'
=>
[
array_merge
(
$tags
,
$audiences
),
],
];
break
;
case
'uw_ct_event'
;
$tags
=
$this
->
uwGetTermsFromEntityField
(
$node
->
get
(
'field_uw_event_tags'
),
'tags'
);
$audiences
=
$this
->
uwGetTermsFromEntityField
(
$node
->
get
(
'field_uw_audience'
),
'tags'
);
$types
=
$this
->
uwGetTermsFromEntityField
(
$node
->
get
(
'field_uw_event_type'
),
'tags'
);
$footer_data
=
[
'tags'
=>
[
array_merge
(
$tags
,
$audiences
,
$types
),
],
];
break
;
case
'uw_ct_news_item'
;
$tags
=
$this
->
uwGetTermsFromEntityField
(
$node
->
get
(
'field_uw_news_tags'
),
'tags'
);
$audiences
=
$this
->
uwGetTermsFromEntityField
(
$node
->
get
(
'field_uw_audience'
),
'tags'
);
$footer_data
=
[
'tags'
=>
[
array_merge
(
$tags
,
$audiences
),
],
];
break
;
}
// Return the header data.
return
$footer_data
;
}
/**
* {@inheritDoc}
*/
...
...
This diff is collapsed.
Click to expand it.
src/Service/UWServiceInterface.php
+
0
−
22
View file @
76aac44f
...
...
@@ -183,28 +183,6 @@ interface UWServiceInterface {
*/
public
function
uwMonthNameShort
(
int
$month
=
NULL
);
/**
* A function to get the header data for a node/content type.
*
* @param \Drupal\node\Entity\Node $node
* The node object.
*
* @return array
* An array containing the header data for a node/content type.
*/
public
function
uwGetHeaderData
(
Node
$node
):
array
;
/**
* A function to get the footer data for a node/content type.
*
* @param \Drupal\node\Entity\Node $node
* The node object.
*
* @return array
* An array containing the footer data for a node/content type.
*/
public
function
uwGetFooterData
(
Node
$node
):
array
;
/**
* A function get the taxonomy terms.
*
...
...
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