Skip to content
Snippets Groups Projects
Commit 08046e12 authored by xiaohua guan's avatar xiaohua guan Committed by Yas Naoi
Browse files

Issue #3042288 by Xiaohua Guan, yas, Masami: Hide Encrypted field of fieldset...

Issue #3042288 by Xiaohua Guan, yas, Masami: Hide Encrypted field of fieldset Others in Volume view page
parent 683e05f5
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,15 @@ abstract class Ec2BaseViewBuilder extends EntityViewBuilder {
*/
public function view(EntityInterface $entity, $view_mode = 'full', $langcode = NULL) {
$weight = -50;
// Default parameters.
$default_params = [];
foreach ($this->getFieldsetDefs() as $fieldset_def) {
foreach ($fieldset_def['fields'] as $field_name) {
$default_params[$field_name] = NULL;
}
}
foreach ($this->getFieldsetDefs() as $fieldset_def) {
$fieldset_name = $fieldset_def['name'];
$build[$fieldset_name] = [
......@@ -33,7 +42,7 @@ abstract class Ec2BaseViewBuilder extends EntityViewBuilder {
'#open' => $fieldset_def['open'],
];
$params = [];
$params = $default_params;
foreach ($fieldset_def['fields'] as $field_name) {
$params[$field_name] = $this->getFieldValue(
$entity,
......@@ -42,10 +51,6 @@ abstract class Ec2BaseViewBuilder extends EntityViewBuilder {
);
}
if (!isset($params['user_id'])) {
$params['user_id'] = NULL;
}
$new_entity = $entity->create($params);
$build[$fieldset_name][] = parent::view($new_entity, $view_mode, $langcode);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment