Skip to content

Commit

Permalink
add metadata to location content types (#1679)
Browse files Browse the repository at this point in the history
  • Loading branch information
rloos289 authored May 28, 2024
1 parent 6db0ac0 commit 859a844
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion web/modules/custom/sfgov_api/src/Payload/RawPayload.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function setPayloadData() {
}
}

if ($entity_type === 'node' || $entity_type === 'media') {
if ($entity_type === 'node' || $entity_type === 'media' || $entity_type === 'location') {
$raw_data['metadata'] = $metadata;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public function getRawImage($image_field) {
'file' => $file_path,
'fid' => $image_data->entity->id(),
// @todo , remove once we have a better source for alt text.
'alt_text' => $image_data->get('field_logo')[0]->get('alt')->getValue() ?: 'temp',
'alt_text' => $image_data->get('field_logo')[0]->get('alt')->getValue() ?: '',
];
}
return $file_data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function setBaseData($media) {
'fid' => $file_data['fid'],
'published' => $media->ispublished(),
// @todo , remove once we have a better source for alt text.
'alt_text' => 'temp',
'alt_text' => '',
];
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function getGetHelpValues($entity) {
*/
public function getSteps($data) {
$steps = [
'section_title' => $data['title'] ?? 'temp',
'section_title' => $data['title'] ?? '',
'section_specifics' => [],
];
foreach ($data['value'] as $value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Email extends SfgApiParagraphBase {
public function setCustomData($entity) {
return [
'email' => $entity->get('field_email')->value,
'title' => $entity->get('field_title')->value ?: 'temp',
'title' => $entity->get('field_title')->value ?: '',
];
}

Expand Down

0 comments on commit 859a844

Please sign in to comment.