protected function InstallHelper::processDisclaimerBlock in Drupal 8
Same name and namespace in other branches
- 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.
1 call to InstallHelper::processDisclaimerBlock()
- InstallHelper::processContent in core/
profiles/ demo_umami/ modules/ demo_umami_content/ src/ InstallHelper.php - Process content into a structure that can be saved into Drupal.
File
- core/
profiles/ demo_umami/ modules/ demo_umami_content/ src/ InstallHelper.php, line 619
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;
}