Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OEL-477: Create User profile card pattern, and field group custom form… #48

Open
wants to merge 11 commits into
base: 1.x
Choose a base branch
from

Conversation

GilNovacomm
Copy link
Contributor

Override the card pattern for the user profile.
Create a custom Field Formatter for field group to print fields evenly in two columns

Copy link
Contributor

@Maxfire Maxfire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small changes.

];

// Number of items in the first columns.
$first_column_elements = array_slice($children, 0, ceil(count($children) / 2));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ceil is waiting for a float not an int

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact ceil can receive both int and floats, but in this case ceil is rounding up for then we have un-even elements.


// Append RDF term mappings on displayed taxonomy links.
foreach (Element::children($build) as $field_name) {
$field = &$build[$field_name];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's not returning anything, is this being used?

/**
* {@inheritdoc}
*/
public function preRender(&$element, $rendering_object): void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have an issue with this according to the complexity, please have a look at https://drone.fpfis.eu/openeuropa/oe_whitelabel/483/20

'first_column' => '',
'second_column' => '',
'hide_table_if_empty' => FALSE,
] + parent::defaultSettings($context);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parent doesn't need a variable, do we need it here? just a question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants