Bug #3676

SelectViewHelper should automatically use the persistence manager to determine the UID of an object

Added by Sebastian Kurfuerst over 12 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Must have
Category:
Core
Target version:
Start date:
2009-06-15
Due date:
% Done:

100%

Estimated time:
Has patch:

Description

It'd be very nice if the SelectViewHelper would work together with the persistence manager, so lists of objects are correctly added.

#1

Updated by Karsten Dambekalns over 12 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns
  • Branch changed from v4 to v4 + v5
#2

Updated by Karsten Dambekalns over 12 years ago

Hi,

  • for the value try to use
    1. optionValueField
    2. UUID
    3. __toString()
  • for the label try to use
    1. optionLabelField
    2. __toString()
    3. UUID
#3

Updated by Bastian Waidelich over 12 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 over 12 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 over 12 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 over 12 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 over 12 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r2832.

#8

Updated by Robert Lemke over 12 years ago

  • Target version changed from 1.0 to 1.0.0 alpha 3

Also available in: Atom PDF