public function getLoc($element, $language = null)
    {
        return $this
            ->router
            ->generate($element, [
                '_locale' => $language,
            ], false);
    }
public function getLoc($element, $language = null)
    {
        return $this
            ->router
            ->generate($element, [
                '_locale' => $language,
            ], false);
    }
public function getLoc ( $ element , $ language = null ) { return $ this -> router -> generate ( $ element , [ '_locale' => $ language , ] , false ) ; }
Get url given an entity.

@param mixed       $element  Element
@param string|null $language Language

@return string url
Get url given an entity .