Class LinkHelper

Description

This class has static methods, that can be used to create and parse BIGACE URLs.

These links are all related to the top Class:

  1. classes.util.CMSLink

Whenever you link to a Page, inside your Modul or to BIGACE Applications... you should use the methods of this class, to make sure the link works properly in all future versions!

  • version: $Id: LinkHelper.php,v 1.5 2006/11/26 22:04:03 kpapst Exp $
  • copyright: Copyright (C) 2002-2006 Kevin Papst
  • author: Kevin Papst
  • license: GNU Public License


			
Method Summary
String createLink (String $adress, [array $params = array()])
null getCMSLinkFromItem (Item $item)
null getUrlFromCMSLink (CMSLink $cmsLink, [array $params = array()])
Methods
createLink (line 104)

Appends Parameter to a given URL. It takes care about the ? separator and appends the Session ID if required (in case of inaccepted Cookies).

  • return: the created URL
String createLink (String $adress, [array $params = array()])
  • String $adress: adress the URL (if empty a link like ?foo=bar will be created)
  • array $params: params the URL Parameter as key-value mapped array
getCMSLinkFromItem (line 136)

Creates an CMSLink instance for the given Item.

  • return: if the first argument is of wrong class type
null getCMSLinkFromItem (Item $item)
  • Item $item: item the Item to link to
getUrlFromCMSLink (line 60)

Gets the URL for the given CMSLink.

This method takes care about the Rewrite settings.

If you want to link to an Item (e.g. a Menu), you can call something like this:

  • return: if the first argument is of wrong class type
null getUrlFromCMSLink (CMSLink $cmsLink, [array $params = array()])
  • CMSLink $cmsLink: cmsLink the CMSLink to get the URL for
  • array $params: params extended URL Parameter (like http://url?foo=bar)

Documentation generated by phpDocumentor 1.3.1