DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: Ext JS

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Joerg Schoppet
Changed:2008-10-27T13:29:16
Author:Joerg Schoppet
Email:joerg@schoppet.de
Info 3:
Info 4:

EXT: Ext JS

Extension Key: extjs

Copyright 2008, Joerg Schoppet, <joerg@schoppet.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: Ext JS 1

Introduction 1

Users manual 1

Example code 1

Configuration 2

Adapters 3

Backend 3

Known problems 3

Changelog 3

Introduction

Ext is a client-side, JavaScript framework for building web applications (by Jack Slocum). This extension provide Ext itself and a PHP library to easily implement it from PHP.

This extension is only useful for PHP developers!

Ext is a third party library (independent from TYPO3) and uses it's own license.

Ext is licensed under the LGPL-license (see http://extjs.com/license).

Users manual

Example code

Here's an example code how to use the PHP class tx_extjs.

The red lines are calls of the class tx_extjs. Green lines show configuration that will be passed to the tx_extjs functions.

// include the file
require_once(t3lib_extMgm::extPath("extjs")."class.tx_extjs.php");
// define, which adapter to use
tx_extjs::setAdapter('yui');
// define, which css-template to use
tx_extjs::setResource('default');
tx_extjs::includeLib();

Please note that the class can be used without making an instance: tx_extjs::includeLib()

Configuration

There are five different configuration possibilities in three different ways ;-).

Configuration possibilities:

You can define, which adapter Ext should use.

You can define, which css Ext should use.

You can define, if you want the compressed or uncompressed javascript- code to be included.

You can define, if you want to have a special language.

You can define, if you want not to include any css-code.

Process order:

you can set the configuration in your extension

tx_extjs::setAdapter('yui');
tx_extjs::setResource('default');
tx_extjs::setCompressed(TRUE);
tx_extjs::setLanguage('de');
tx_extjs::setNoCSS(TRUE);

you can define these values through TypoScript

plugin.tx_extjs.adapter = yui
plugin.tx_extjs.resource = default
plugin.tx_extjs.compressed = true
plugin.tx_extjs.language = en
plugin.tx_extjs.no_css = true

the default values are used

adapter is set to “ext”

resource is set to “default”

compressed is set to “true”

language is set to nothing (buildin english is used)

css is included

((generated))

Reference
TypoScript
adapter

Property

adapter

Data type

string

Description

Defines, which underlying js-library should be used, actually there are the following:

  • ext
  • jquery
  • prototype
  • yui

Default

ext

resource

Property

resource

Data type

string

Description

Defines, which css-theme to use, actually there are the following:

  • aero
  • default
  • gray
  • vista

Default

default

compressed

Property

compressed

Data type

string

Description

TRUE or FALSE

If FALSE is typed, the src from the uncompressed-folder is used.

Default

TRUE

language

Property

language

Data type

string

Description

Defines, which language to use for buildin functionality (e.g. date)

Default

NOTHING

no_css

Property

no_css

Data type

string

Description

TRUE or FALSE

If TRUE is typed, no css will be included

Default

FALSE

[tsref:plugin.tx_extjs]

PHP functions in class tx_extjs
includeLib()

Function/Property

includeLib()

Data type

Description

Include the extjs library and the necessary css

Any configuration has to be done before with the functions setAdapter(), setResource() and setCompressed().

Default

BeincludeLib()

Function/Property

BeincludeLib()

Data type

Description

returns an array with the extjs library and the necessary css for inclusion in Backend

Default

setAdapter()

Function/Property

setAdapter()

Data type

Description

Defines, which underlying js-library should be used.

Default

$adapter

Function/Property

$adapter

Data type

string

Description

Name of the adapter

Default

ext

setResource()

Function/Property

setResource()

Data type

Description

Defines, which css-theme to use

Default

$resource

Function/Property

$resource

Data type

string

Description

Name of the resource

Default

default

setCompressed()

Function/Property

setCompressed()

Data type

Description

Defines if compressed or uncompressed ext-libraries should be included

Default

$var

Function/Property

$var

Data type

boolean

Description

If FALSE, uncompressed scripts are included.

Default

TRUE

setLanguage()

Function/Property

setLanguage()

Data type

Description

Defines, which language to use

Default

$lang

Function/Property

$lang

Data type

string

Description

Name of the language (see EXT:extjs/src/locale)

Default

''

setNoCSS()

Function/Property

setNoCSS()

Data type

Description

Defines, if css should be included or not

Default

$var

Function/Property

$var

Data type

boolean

Description

If TRUE, no css-files are included.

Default

FALSE

Adapters

To save space for the extension I've removed the special adapter- libraries for jQuery and Prototype from this extension. If you want to use one of these adapters, you have to assure, that they are loaded, before this extension loads. For this you can simple use one of the existing extensions (e.g. jquery, script.aculo.us).

Backend

As of now, it is possible to use ExtJS in the Backend. Use all the set-functions as mentioned above, but instead of

tx_extjs::includeLib()

use

$returnArr = tx_extjs::BEincludeLib();

In the return-variable you will have an array with the following layout:

array(
'css' => '',
'js' => '',
'additional_js' => '',
)

Just place the respective content to the accordant places and everything should work.

Known problems

Nothing known.

Changelog

  • 09.07.2007: Initial release with Ext version 1.0.1a
  • 11.09.2007: included Backend function, included setting of BLANK_IMG_URL
  • 11.09.2007: updated Ext to version 1.1.1, included the stand-alone adapter “ext”
  • 11.09.2007: added possibility to include a language
  • 11.09.2007: added possibility to flag, if css-files should be included or not
  • 27.10.2008: updated Ext to version 2.2, removed backward-compatibility with version 1.1 in root-folder (everything is now in versions-dir) Thanks to Nils Dehl

img-1 EXT: Ext JS - 3