private function getDrupalEntityPath($type, $entity)
    {
        $uri = entity_uri($type, $entity);

        if (!$uri) {
            throw new \InvalidArgumentException(sprintf("%s: entity type is not supported yet"));
        }

        return $uri['path'];
    }
private function getDrupalEntityPath($type, $entity)
    {
        $uri = entity_uri($type, $entity);

        if (!$uri) {
            throw new \InvalidArgumentException(sprintf("%s: entity type is not supported yet"));
        }

        return $uri['path'];
    }
private function getDrupalEntityPath ( $ type , $ entity ) { $ uri = entity_uri ( $ type , $ entity ) ; if ( ! $ uri ) { throw new \ InvalidArgumentException ( sprintf ( "%s: entity type is not supported yet" ) ) ; } return $ uri [ 'path' ] ; }
Uses drupal 7 API to generate the entity URL

@param string $type
@param mixed $entity

@return string
Uses drupal 7 API to generate the entity URL