Bug #3676
SelectViewHelper should automatically use the persistence manager to determine the UID of an object
Status: | Resolved | Start date: | 2009-06-15 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Karsten Dambekalns | % Done: | 100% |
|
Category: | Core | |||
Target version: | 1.0.0 alpha 3 | |||
Has patch: | Affected Flow version: |
Description
It'd be very nice if the SelectViewHelper would work together with the persistence manager, so lists of objects are correctly added.
Associated revisions
[+BUGFIX] Fluid (ViewHelper): SeelctViewHelper now handles collections of objects passed as options as expected virtually always, fixes #3676
[~TASK] FLOW3: renamed getUUIDByObject() to getIdentifierByObject() and getObjectByUUID() to getObjectByIdentifier(), relates to #3676
[~TASK] Fluid: renamed getUUIDByObject() to getIdentifierByObject() and getObjectByUUID() to getObjectByIdentifier(), relates to #3676
[~TASK] Fluid: some fixes to ViewHelper documentation
History
#1 Updated by Karsten Dambekalns about 6 years ago
- Status changed from New to Accepted
- Assigned To set to Karsten Dambekalns
- Branch changed from v4 to v4 + v5
#2 Updated by Karsten Dambekalns about 6 years ago
Hi,
- for the
value
try to use- optionValueField
- UUID
- __toString()
- for the
label
try to use- optionLabelField
- __toString()
- UUID
#3 Updated by Bastian Waidelich about 6 years ago
Let's try to keep this abstract to be able to backport this to extbase. Instead of working with UUIDs or UIDs we might have some kind of entity service that is able of turning an entity object into an "identity" and vice versa.
An identity could be an array..
In FLOW3:
array('__identity' => '6a12a4d5-e9e6-4568-afcc-34c70b24a668');
and in Extbase:
array('uid' => 123);
We could use the same feature to generate the "hidden identity fields" in the form view helper.
What do you think?
#4 Updated by Karsten Dambekalns about 6 years ago
Bastian Waidelich wrote:
Let's try to keep this abstract to be able to backport this to extbase. Instead of working with UUIDs or UIDs we might have some kind of entity service that is able of turning an entity object into an "identity" and vice versa.
I am currently using $this->persistenceManager->getBackend()->getUUIDByObject($value)
- that should be available in Extbase, right?
#5 Updated by Karsten Dambekalns about 6 years ago
Karsten Dambekalns wrote:
I am currently using
$this->persistenceManager->getBackend()->getUUIDByObject($value)
- that should be available in Extbase, right?
Hmpf. In Extbase it is getUidByObject(). OTOH that seems easy to solve by a replacement rule for the Backporter, no?
#6 Updated by Karsten Dambekalns about 6 years ago
I discussed that with Bastian and we decided to name the methods getIdentifierByObject
and getObjectByIdentifier
. That works for UUIDs and UIDs (i.e. FLOW3 and Extbase) and still is distinguishable from identity while being short (as opposed to e.g. getTechnicalIdentifierByObject
).
#7 Updated by Karsten Dambekalns about 6 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset r2832.
#8 Updated by Robert Lemke about 6 years ago
- Target version changed from 1.0 to 1.0.0 alpha 3