Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jan 23, 2021

Q A
Branch? 5.2
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #39874
License MIT
Doc PR


do {
$translationDomain = $form->getConfig()->getOption('translation_domain');
} while (null === $translationDomain && null !== $form = $form->getParent());
Copy link

Choose a reason for hiding this comment

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

nit-pick: The loop is a duplicate of the above one. Introduce a private function?

private function getOption($form, $optionLabel) {
  do {
    $option = $form->getConfig()->getOption($optionLabel);
  } while (null === $option && null !== $form = $form->getParent());

  return $option;
}

@xabbuh xabbuh merged commit c38473a into symfony:5.2 Jan 24, 2021
@xabbuh xabbuh deleted the issue-39874 branch January 24, 2021 20:09
@fabpot fabpot mentioned this pull request Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants