api.zedseries.com
[ class tree: Ui ] [ index: Ui ] [ all elements ]

Class: ZedSeriesUi

Source Location: /ZedSeriesUi.php

Class ZedSeriesUi

Class Overview

Class ZedSeriesUi

a class that aims to output "pieces" of backend in an easy way

Located in /ZedSeriesUi.php [line 41]



		
				Author(s):
		
		
		
Information Tags:
Copyright:  Angelo Galleja 2008,2009,2010

Properties

Methods

[ Top ]
Property Summary
mixed   $last  

[ Top ]
Method Summary
static void   redirect()   redirect user in the backend prepend 'contao' to the $url if version >= 2.9 prepend 'typolight' to the $url if version < 2.9
static string   setBackendMain()   replace the "main" section of the backend it is intended to be used inside a parseBackendTemplate hook callback
static void   throwError()   redirect user to a special error page managed though the ErrorManager
ZedSeriesUi   __construct()  
string   beLink()   generates a backend link
string   box()   generates a box
void   btBack()  
string   buttonbar()   it is currently in beta displays a buttonbar
void   generate()  
string   getBackendModuleTitle()   get the current backend Module Title
void   ifcMessage()   display a message field, common usage will be in custom dca fields
void   initAttrs()  
string   link()   generates a link
string   listingContainer()   show a listing container please note that in order to obtain the best results you need to put some listingItem inside it
string   listingItem()   show a listing item please note that in order to obtain the best results you need to put the listingItem inside a listingContainer
void   newTemplate()  
string   par()   displays a paragraph
void   setBackendModuleTitle()   replace the default backend module title (taken from 'do' url value with a custom one)
void   setBackendModuleTitleFromUrl()  
string   title()   displays a title
void   uiBackendModuleTitle()   to activate the HOOK be sure to put the following line into the config.php of your extension

[ Top ]
Properties
mixed   $last [line 43]
API Tags:
Access:  protected


[ Top ]
Methods
static method redirect  [line 62]

  static void redirect( string $url  )

redirect user in the backend prepend 'contao' to the $url if version >= 2.9 prepend 'typolight' to the $url if version < 2.9

Parameters:
string   $url:  url should start with main.php

API Tags:
Access:  public


[ Top ]
static method setBackendMain  [line 186]

  static string setBackendMain( string $strContent, string $mainContent  )

replace the "main" section of the backend it is intended to be used inside a parseBackendTemplate hook callback

Parameters:
string   $strContent:  the output of backend as string
string   $mainContent:  the content to be added to the backend main section

API Tags:
Return:  the backend output with "main" replaced
Access:  public


[ Top ]
static method throwError  [line 201]

  static void throwError( )

redirect user to a special error page managed though the ErrorManager


API Tags:
Access:  public


[ Top ]
Constructor __construct  [line 45]

  ZedSeriesUi __construct( [ $theme = 'zsui']  )

Parameters:
   $theme: 

API Tags:
Access:  public


[ Top ]
beLink  [line 309]

  string beLink( string $text, string $url, [string $class = ''], [string $id = ''], [array $arrAttrs = array()]  )

generates a backend link

Parameters:
string   $text:  the anchor text
string   $url:  the backend url (e.g. do=MyModule)
array   $arrAttrs:  an array of attributes
string   $class:  class a css class
string   $id:  id an id class

API Tags:
Access:  public


[ Top ]
box  [line 379]

  string box( string $text, [string $class = ''], [string $id = ''], [array $arrAttrs = array()]  )

generates a box

a box is a nice show if you want to output a single line message

Parameters:
string   $text:  the text to put inside
array   $arrAttrs:  an array of attributes
string   $class:  class a css class
string   $id:  id an id class

API Tags:
Access:  public


[ Top ]
btBack  [line 257]

  void btBack( [ $link = null], [ $label = null]  )

Parameters:
   $link: 
   $label: 

API Tags:
Access:  public


[ Top ]
buttonbar  [line 225]

  string buttonbar( string $cnt  )

it is currently in beta displays a buttonbar

Parameters:
string   $cnt:  content to show inside the button bar

API Tags:
Access:  public


[ Top ]
generate  [line 440]

  void generate( $objTemplate, $text, $arrTemplateVars  )

Parameters:
   $objTemplate: 
   $text: 
   $arrTemplateVars: 

API Tags:
Access:  protected


[ Top ]
getBackendModuleTitle  [line 147]

  string getBackendModuleTitle( )

get the current backend Module Title


API Tags:
Return:  the current title of the module
Access:  public


[ Top ]
ifcMessage  [line 336]

  void ifcMessage( $cnt, [ $class = ''], [ $id = ''], [ $arrAttrs = array()]  )

display a message field, common usage will be in custom dca fields

i.e. fields generated through input_field_callback

Parameters:
   $cnt: 
   $class: 
   $id: 
   $arrAttrs: 

API Tags:
Access:  public


[ Top ]
initAttrs  [line 164]

  void initAttrs( &$arrAttrs, $class, $id  )

Parameters:
   &$arrAttrs: 
   $class: 
   $id: 

API Tags:
Access:  public


[ Top ]
link  [line 354]

  string link( $anchor, string $url, [string $class = ''], [string $id = ''], [array $arrAttrs = array()], string $text  )

generates a link

Parameters:
string   $text:  the anchor text
string   $url:  the url (absolute or relative to the TYPOlight installation)
array   $arrAttrs:  an array of attributes
string   $class:  class a css class
string   $id:  id an id class
   $anchor: 

API Tags:
Access:  public


[ Top ]
listingContainer  [line 400]

  string listingContainer( $cnt $cnt  )

show a listing container please note that in order to obtain the best results you need to put some listingItem inside it

Parameters:
$cnt   $cnt:  the content to put inside

API Tags:
Access:  public


[ Top ]
listingItem  [line 418]

  string listingItem( string $left, string $right, [string $class = 'tl_file'], [string $id = '']  )

show a listing item please note that in order to obtain the best results you need to put the listingItem inside a listingContainer

Parameters:
string   $left:  the content for the left column (usually title of item)
string   $right:  the content for the right column (usually buttons and links)
string   $class:  the class name for the listing item
string   $id:  id to assign to the listing item content (left column)

API Tags:
Access:  public


[ Top ]
newTemplate  [line 430]

  void newTemplate( $strTemplate  )

Parameters:
   $strTemplate: 

API Tags:
Access:  protected


[ Top ]
par  [line 243]

  string par( string $text, [string $class = ''], [string $id = ''], [ $arrAttrs = array()]  )

displays a paragraph

you can specifiy an (optional) css class and/or an optional id

Parameters:
string   $text:  content to show inside
string   $class:  class a css class
string   $id:  id an id class
   $arrAttrs: 

API Tags:
Access:  public


[ Top ]
setBackendModuleTitle  [line 158]

  void setBackendModuleTitle( $title  )

replace the default backend module title (taken from 'do' url value with a custom one)

can be useful when you have some custom keys and want to give a more detailed title

Parameters:
   $title: 

API Tags:
Access:  public


[ Top ]
setBackendModuleTitleFromUrl  [line 102]

  void setBackendModuleTitleFromUrl( )


API Tags:
Access:  public


[ Top ]
title  [line 285]

  string title( string $text, [string $class = ''], [string $id = ''], [ $arrAttrs = array()]  )

displays a title

you can specifiy an (optional) css class and/or an optional id

Parameters:
string   $text:  content to show inside
string   $class:  class a css class
string   $id:  id an id class
   $arrAttrs: 

API Tags:
Access:  public


[ Top ]
uiBackendModuleTitle  [line 92]

  void uiBackendModuleTitle( $strContent, $strTemplate  )

to activate the HOOK be sure to put the following line into the config.php of your extension

$GLOBALS['TL_HOOKS']['outputBackendTemplate'][] = array('ZedSeriesUi', 'uiBackendModuleTitle');

set the backend module title with the following logic

if there is a $key url parameter the title will be taken from $GLOBALS['TL_LANG']['MOD'][$key] if there is a $table url parameter the title will be taken from $GLOBALS['TL_LANG']['MOD'][$table]

if none of the above are present the title will be taken from $GLOBALS['TL_LANG']['uiTitle']

Parameters:
   $strContent: 
   $strTemplate: 

API Tags:
Access:  public


[ Top ]

Documentation generated on Fri, 22 Oct 2010 17:37:30 +0200 by phpDocumentor 1.4.1