Created
January 22, 2016 05:50
-
-
Save martinlipp/da5302504e9970f15a51 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88a89 | |
> | |
91c92,104 | |
< $checked = in_array($valueAttribute, $propertyValue); | |
--- | |
> foreach ($propertyValue as $value) { | |
> if (is_object($value)) { | |
> $identifier = $this->persistenceManager->getIdentifierByObject($value); | |
> if ($identifier !== NULL) { | |
> $value = $identifier; | |
> } | |
> } | |
> // Not quite sure if identical or equal operator here; in_array did not use strict version | |
> if ($valueAttribute === $value) { | |
> $checked = TRUE; | |
> break; | |
> } | |
> } | |
112a126,139 | |
> | |
> /** | |
> * Get the name of this form element, without prefix. | |
> * | |
> * This is done to prevent the extra __identity being added for objects | |
> * since it leading to property mapping errors and it works without it. | |
> * | |
> * @return string name | |
> */ | |
> protected function getNameWithoutPrefix() | |
> { | |
> $name = parent::getNameWithoutPrefix(); | |
> return str_replace('[__identity]', '', $name); | |
> } | |
114d140 | |
< |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment