Class: applications

Source Location: /CORE/system/classes/util/applications.php

Class applications

Class Overview

Use this Library to create Links to the Default Applications, devlivered with BIGACE.

The rendered HTML can be customized with various methods.

Use this Class to get Links for

  • Home : The Top Level Page for your Consumer
  • Status : Login or Logoff
  • Admin : The Administration Console in a new Window
  • Search : The Standard Search in a POP-UP Window
  • Editor : The Editor in a POP-UP Windows, editing the current Page (Editor type depends on the Default Editor settings)

Located in /CORE/system/classes/util/applications.php [line 49]



		
				Author(s):
		
  • Kevin Papst
Information Tags:
Version:  $Id: applications.php,v 1.28 2009/03/23 13:01:46 kpapst Exp $
Copyright:  Copyright (C) Kevin Papst
License:  GNU Public License

Properties

Methods

[ Top ]
Property Summary
mixed   $ADMIN   Constant for the ADMINISTRATION Link.
mixed   $EDITOR   Constant for the EDITOR Link.
mixed   $HOME   Constant for the HOME Link.
mixed   $PORTLETS   Constant for the PORTLET ADMINISTRATION Link.
mixed   $SEARCH   Constant for the SEARCH Link.
mixed   $STATUS   Constant for the STATUS Link.

[ Top ]
Method Summary
applications   applications()   Constructor setting up some default values.
void   canAccessEditor()   Returns whether the User has the rights to access the Editor.
void   canAccessPortletAdmin()   Calculates whether the Portlet Administration Link and/or Javascript will be shown.
void   createConfiguredAppLink()  
void   getAddPostDelim()  
void   getAddPreDelim()  
void   getAdminLink()   Gets the Administration Link, opening the BIGACE Administration Console.
String   getAllJavascript()   Returns the Javascript Code that has to be set within the HTML File, to make the links work properly.
void   getAllLink()   Returns all Links that should be shown, hide the ones configured by
  1. hide(String)
or the ones the User may not see cause of missing Functional rights or missing rights on the actual Menu.
void   getDelimiter()   Returns the Delimiter that will be used.
String   getEditorJS()   Returns the Javascript used for opening the Default Editor.
String   getEditorLink()   Gets the Link to the Default Editor.
void   getHomeID()  
void   getHomeLink()   Gets the Home Link.
void   getJavascript()   Returns the Javascript for the given Application or an empty String if no javascript is used.
void   getLink()   Gets the Link for the given Application, or an empty String if the Application is not supported.
String   getPortletAdminJS()   Returns the Javascript used for opening the Portlet Administration.
String   getPortletAdminLink()   Gets the Link to the Portlet Administration.
void   getSearchLink()   Gets the Link for opening the Default Search.
void   getStatusLink()   Gets the Status Link, depending on the Users Status we show a Login or Logoff Link.
void   hide()   Adds the given Application to the Hide Array. All submitted Applications will not be added automatically to the Link when calling
  1. getAllLink()
.
void   setAddPostDelim()  
void   setAddPreDelim()  
void   setDelimiter()   Sets both Delimiter (Pre and Post) to the same value.
void   setHomeID()   Set the ID used for the Home Link created by
  1. getHomeLink()
.
void   setImageAlign()   Sets the Alignment for Images.
void   setImageDimension()   Sets the Image width and height. Pass an empty String(default) to define that the attribute should not be set within the image TAG.
void   setLinkClass()   Set the CSS Class that will be used for setting up each links.
void   setPostDelimiter()   Sets the Post-Link-Delimiter.
void   setPreDelimiter()   Sets the Pre-Link-Delimiter.
void   setShowPicture()   Sets whether we show Pictures within the Links.
void   setShowText()   Sets whether we show Text within the Links.

[ Top ]
Properties
mixed   $ADMIN = 'admin' [line 58]

Constant for the ADMINISTRATION Link.


[ Top ]
mixed   $EDITOR = 'editor' [line 66]

Constant for the EDITOR Link.


[ Top ]
mixed   $HOME = 'home' [line 54]

Constant for the HOME Link.


[ Top ]
mixed   $PORTLETS = 'portletadmin' [line 74]

Constant for the PORTLET ADMINISTRATION Link.


[ Top ]
mixed   $SEARCH = 'search' [line 62]

Constant for the SEARCH Link.


[ Top ]
mixed   $STATUS = 'status' [line 70]

Constant for the STATUS Link.


[ Top ]
Methods
Constructor applications  [line 97]

  applications applications( )

Constructor setting up some default values.



[ Top ]
canAccessEditor  [line 350]

  void canAccessEditor( )

Returns whether the User has the rights to access the Editor.



[ Top ]
canAccessPortletAdmin  [line 396]

  void canAccessPortletAdmin( )

Calculates whether the Portlet Administration Link and/or Javascript will be shown.

Uses the Layout (global for this request) and Functional Rights.



[ Top ]
createConfiguredAppLink  [line 581]

  void createConfiguredAppLink( $link, $description, $icon, [ $target = '']  )

Parameters:
   $link: 
   $description: 
   $icon: 
   $target: 


[ Top ]
getAddPostDelim  [line 195]

  void getAddPostDelim( )



[ Top ]
getAddPreDelim  [line 194]

  void getAddPreDelim( )



[ Top ]
getAdminLink  [line 334]

  void getAdminLink( [String $desc = ''], [String $img = '']  )

Gets the Administration Link, opening the BIGACE Administration Console.

Parameters:
String   $desc:  the text information for the Link
String   $img:  the image name for the Link


[ Top ]
getAllJavascript  [line 552]

  String getAllJavascript( )

Returns the Javascript Code that has to be set within the HTML File, to make the links work properly.


API Tags:
Return:  the Javascript to past to the Page


[ Top ]
getAllLink  [line 517]

  void getAllLink( )

Returns all Links that should be shown, hide the ones configured by

  1. hide(String)
or the ones the User may not see cause of missing Functional rights or missing rights on the actual Menu.


API Tags:
See:  applications::hide()


[ Top ]
getDelimiter  [line 237]

  void getDelimiter( )

Returns the Delimiter that will be used.


API Tags:
Deprecated:  use getPreDelimiter() and getPostDelimiter() instead!


[ Top ]
getEditorJS  [line 381]

  String getEditorJS( )

Returns the Javascript used for opening the Default Editor.


API Tags:
Return:  the Javascript or an empty String


[ Top ]
getEditorLink  [line 367]

  String getEditorLink( [String $desc = ''], [String $img = '']  )

Gets the Link to the Default Editor.

Parameters:
String   $desc:  the text information for the Link
String   $img:  the image name for the Link

API Tags:
Return:  the Link or an empty String


[ Top ]
getHomeID  [line 275]

  void getHomeID( )



[ Top ]
getHomeLink  [line 295]

  void getHomeLink( [String $desc = ''], [String $img = '']  )

Gets the Home Link.

Parameters:
String   $desc:  the textual description for the Link (default is a Translation String called 'home')
String   $img:  the image filename for the Link (defalt is 'home.gif')


[ Top ]
getJavascript  [line 500]

  void getJavascript( String $name  )

Returns the Javascript for the given Application or an empty String if no javascript is used.

Parameters:
String   $name:  the Application Name


[ Top ]
getLink  [line 476]

  void getLink( String $name, [String $desc = ''], [String $img = '']  )

Gets the Link for the given Application, or an empty String if the Application is not supported.

Parameters:
String   $name:  the Application name ($HOME,$ADMIN,$SEARCH,$EDITOR,$STATUS)
String   $desc:  the text information for the Link
String   $img:  the image name for the Link


[ Top ]
getPortletAdminJS  [line 440]

  String getPortletAdminJS( )

Returns the Javascript used for opening the Portlet Administration.


API Tags:
Return:  the Javascript or an empty String


[ Top ]
getPortletAdminLink  [line 425]

  String getPortletAdminLink( [ $desc = ''], [ $img = '']  )

Gets the Link to the Portlet Administration.

Parameters:
   $desc: 
   $img: 

API Tags:
Return:  the Link or an empty String


[ Top ]
getSearchLink  [line 458]

  void getSearchLink( [String $desc = ''], [String $img = '']  )

Gets the Link for opening the Default Search.

Parameters:
String   $desc:  the text information for the Link
String   $img:  the image name for the Link


[ Top ]
getStatusLink  [line 311]

  void getStatusLink( [String $desc = ''], [String $img = '']  )

Gets the Status Link, depending on the Users Status we show a Login or Logoff Link.

Parameters:
String   $desc:  the text information for the Link
String   $img:  the image name for the Link


[ Top ]
hide  [line 125]

  void hide( String $app  )

Adds the given Application to the Hide Array. All submitted Applications will not be added automatically to the Link when calling

  1. getAllLink()
.

This does not affect hte work of the methods like

.

Parameters:
String   $app:  the Application name ($HOME,$ADMIN,$SEARCH,$EDITOR,$STATUS)


[ Top ]
setAddPostDelim  [line 197]

  void setAddPostDelim( $delim  )

Parameters:
   $delim: 


[ Top ]
setAddPreDelim  [line 196]

  void setAddPreDelim( $delim  )

Parameters:
   $delim: 


[ Top ]
setDelimiter  [line 212]

  void setDelimiter( String $delim  )

Sets both Delimiter (Pre and Post) to the same value.

Those will be used when creating Links.

Parameters:
String   $delim:  the Delimiter to use (normally some kind of HTML TAG)


[ Top ]
setHomeID  [line 283]

  void setHomeID( String $id  )

Set the ID used for the Home Link created by

  1. getHomeLink()
.

Parameters:
String   $id:  id the Menu ID for Home


[ Top ]
setImageAlign  [line 181]

  void setImageAlign( [ $align = null]  )

Sets the Alignment for Images.

Parameters:
   $align: 


[ Top ]
setImageDimension  [line 173]

  void setImageDimension( String $width, $height  )

Sets the Image width and height. Pass an empty String(default) to define that the attribute should not be set within the image TAG.

Parameters:
String   $width:  the size or an empty String ''
   $height: 


[ Top ]
setLinkClass  [line 164]

  void setLinkClass( String $class  )

Set the CSS Class that will be used for setting up each links.

Parameters:
String   $class:  the name of the CSS Class


[ Top ]
setPostDelimiter  [line 229]

  void setPostDelimiter( String $delim  )

Sets the Post-Link-Delimiter.

Parameters:
String   $delim:  the Delimiter to use (normally some kind of HTML TAG)


[ Top ]
setPreDelimiter  [line 221]

  void setPreDelimiter( String $delim  )

Sets the Pre-Link-Delimiter.

Parameters:
String   $delim:  the Delimiter to use (normally some kind of HTML TAG)


[ Top ]
setShowPicture  [line 271]

  void setShowPicture( boolean $val  )

Sets whether we show Pictures within the Links.

Parameters:
boolean   $val:  true for showing image links, false for hiding the image


[ Top ]
setShowText  [line 262]

  void setShowText( boolean $val  )

Sets whether we show Text within the Links.

Make sure to pass a REAL boolean, we perfom a check on the argument and only accept it, if

  1. is_bool($val)
returns true!

Parameters:
boolean   $val:  true for showing text links, false for hiding the textual description


[ Top ]