protected function InstallHelper::processDisclaimerBlock in Drupal 10
Same name and namespace in other branches
- 8 core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php \Drupal\demo_umami_content\InstallHelper::processDisclaimerBlock()
- 9 core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php \Drupal\demo_umami_content\InstallHelper::processDisclaimerBlock()
Process disclaimer_block data into disclaimer_block block structure.
Parameters
array $data: Data of line that was read from the file.
Return value
array Data structured as a block.
File
- core/
profiles/ demo_umami/ modules/ demo_umami_content/ src/ InstallHelper.php, line 609
Class
- InstallHelper
- Defines a helper class for importing default content.
Namespace
Drupal\demo_umami_contentCode
protected function processDisclaimerBlock(array $data) {
$values = [
'uuid' => $data['uuid'],
'info' => $data['info'],
'type' => $data['type'],
'langcode' => 'en',
'field_disclaimer' => [
'value' => $data['field_disclaimer'],
'format' => 'basic_html',
],
'field_copyright' => [
'value' => '© ' . date("Y") . ' ' . $data['field_copyright'],
'format' => 'basic_html',
],
];
return $values;
}