Exemplo n.º 1
0
 /**
  * Get element uid
  *
  * @param array|DomainObjectInterface $element
  *
  * @return int|NULL
  */
 protected function getElementUid($element)
 {
     if ($element instanceof DomainObjectInterface) {
         if ($element instanceof AbstractLocalizedEntity) {
             return (int) $element->getLocalizedUid();
         }
         return (int) $element->getUid();
     }
     if (is_array($element) && isset($element['uid'])) {
         return (int) $element['uid'];
     }
     return NULL;
 }