public function url($object = null)
    {
        if (is_object($object)) {
            $objectIdField = $this->objectIdField;

            return $this->urlName . '/' . $object->$objectIdField;
        } elseif ($object) {
            return $this->urlName . '/' . $object;
        }

        return $this->urlName;
    }
public function url($object = null)
    {
        if (is_object($object)) {
            $objectIdField = $this->objectIdField;

            return $this->urlName . '/' . $object->$objectIdField;
        } elseif ($object) {
            return $this->urlName . '/' . $object;
        }

        return $this->urlName;
    }
public function url ( $ object = null ) { if ( is_object ( $ object ) ) { $ objectIdField = $ this -> objectIdField ; return $ this -> urlName . '/' . $ object -> $ objectIdField ; } elseif ( $ object ) { return $ this -> urlName . '/' . $ object ; } return $ this -> urlName ; }
Formats and returns a URL to an object or object id.

@param null $object
@return string
Formats and returns a URL to an object or object id .