Open
Description
This issue is automatically created based on existing pull request: #38749: Fix customer widgets to use proper formatters
Description (*)
Many of the customer widgets does not process the id nor the name formatter if given.
This MR aims to fix it by using the methods getFieldName and getFieldId which are declared within the parent class \Magento\Customer\Block\Widget\AbstractWidget.
/**
* @return string
*/
public function getFieldIdFormat()
{
if (!$this->hasData('field_id_format')) {
$this->setData('field_id_format', '%s');
}
return $this->getData('field_id_format');
}
/**
* @return string
*/
public function getFieldNameFormat()
{
if (!$this->hasData('field_name_format')) {
$this->setData('field_name_format', '%s');
}
return $this->getData('field_name_format');
}
/**
* @param string $field
* @return string
*/
public function getFieldId($field)
{
return sprintf($this->getFieldIdFormat(), $field);
}
/**
* @param string $field
* @return string
*/
public function getFieldName($field)
{
return sprintf($this->getFieldNameFormat(), $field);
}
Related Pull Requests
Fixed Issues (if relevant)
- Fixes magento/magento2#<issue_number>
Manual testing scenarios (*)
- ...
- ...
Questions or comments
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmedMay be fixed according to the position in the backlog.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branchIssue related to Developer Experience and needs help with Triage to Confirm or Reject it