private function getItemId($args)
    {
        $entity = $args->getEntity();
        if ($entity instanceof Item) {
            return $entity->getId();
        }
        return null;
    }
private function getItemId($args)
    {
        $entity = $args->getEntity();
        if ($entity instanceof Item) {
            return $entity->getId();
        }
        return null;
    }
private function getItemId ( $ args ) { $ entity = $ args -> getEntity ( ) ; if ( $ entity instanceof Item ) { return $ entity -> getId ( ) ; } return null ; }
Returns the id of an Item

@param null|string $args
Returns the id of an Item