Esempio n. 1
0
 /**
  * Returns the (internal) identifier for the object, if it is known to the
  * backend. Otherwise NULL is returned.
  *
  * @param object $object
  * @return string|NULL The identifier for the object if it is known, or NULL
  */
 public function getIdentifierByObject($object)
 {
     if ($object instanceof \TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy) {
         $object = $object->_loadRealInstance();
         if (!is_object($object)) {
             return null;
         }
     }
     return $this->session->getIdentifierByObject($object);
 }
Esempio n. 2
0
 /**
  * Returns the node identifier for the given object
  *
  * @param object $object
  * @throws \InvalidArgumentException
  * @throws \TYPO3\CMS\Extbase\Persistence\Exception\UnknownObjectException
  * @return string
  * @deprecated since 6.1, will be removed two versions later, use the persistence session instead
  */
 public function getIdentifierByObject($object)
 {
     return $this->persistenceSession->getIdentifierByObject($object);
 }