Skip to content
Snippets Groups Projects

Feature/istwcms 4619 ebremner variables for listing page

2 files
+ 10
14
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 8
8
@@ -105,7 +105,7 @@ class UWService implements UWServiceInterface {
/**
* {@inheritDoc}
*/
public function uwGetNodeContent(Node $node, string $content_type, string $view_mode, string $content = 'all'): array {
public function uwGetNodeContent(Node $node, string $view_mode, string $content = 'all'): array {
// Flags for getting teaser content.
$get_header = FALSE;
@@ -134,9 +134,9 @@ class UWService implements UWServiceInterface {
}
// Setup the teaser data array, based on flags.
switch ($content_type) {
switch ($node->getType()) {
case 'blog':
case 'uw_ct_blog':
// The list of tags for blogs.
$tag_list = [
@@ -155,7 +155,7 @@ class UWService implements UWServiceInterface {
];
break;
case 'events':
case 'uw_ct_event':
// The list of tags for events.
$tag_list = [
@@ -174,7 +174,7 @@ class UWService implements UWServiceInterface {
];
break;
case 'news':
case 'uw_ct_news_item':
// The list of tags for news.
$tag_list = [
@@ -193,13 +193,13 @@ class UWService implements UWServiceInterface {
break;
}
return $this->uwGetNodeData($node, $content_type, $view_mode, $content_data);
return $this->uwGetNodeData($node, $view_mode, $content_data);
}
/**
* {@inheritDoc}
*/
public function uwGetNodeData(Node $node, string $content_type, string $view_mode, array $content_data): array {
public function uwGetNodeData(Node $node, string $view_mode, array $content_data): array {
// Array to store the teaser data, need blank
// array in case there is no data to return.
@@ -228,7 +228,7 @@ class UWService implements UWServiceInterface {
case 'date':
if ($view_mode == 'teaser') {
if ($content_type !== 'events') {
if ($node->getType() !== 'events') {
$node_data['date'] = date('l, F j, Y', strtotime($node->$data->value));
}
else {
Loading