[FLOW3-general] Get identifier of entity object
Kevin Ulrich Moschallski
km at 3digit.de
Mon May 16 23:18:22 CEST 2011
Hi list,
i'm currently experimenting with flow3 and extdirect. I know want to
select an object by it's identifier. Therefore i added this to my model:
/**
* @var \F3\FLOW3\Persistence\PersistenceManagerInterface
* @inject
*/
protected $persistenceManager;
/**
* The portal's identity
* @var string
* @identity
* @transient
*/
protected $identifier;
/**
*
* @return string
*/
public function getIdentifier() {
return $this->persistenceManager->getIdentifierByObject($this);
}
This works fine, and getIdentifiertByObject is @api, too. The only
thing i want to know, is if this is the best way to get the identifiert
of an object.
Thanks for help in advance.
Regards,
Kevin
More information about the FLOW3-general
mailing list