[TYPO3-ect] ECT library

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Thu Mar 9 10:28:00 CET 2006


Good morning typoniks,

to open the game I have just uploaded the announced ECT link object.

http://typo3.org/extensions/repository/search/ect/0.0.1/details/class.ect_link.php/

It claims an own namespace for us: ect_ instead of tx_ect_ . So you
still will expierience a warning in your extension manager until this
namespace is officially accepted.




The class is fully documented in the sourcecode.

It is testable with 24 unit tests against a typolink mock object that
imitates the behaviour of tslib_cObj.

On the command line enter: php ect_linkTest.test

It isn't tested in real life yet and the unit test can only be as
realistic as the mock object is.


short usage:

$L = t3lib_div::makeInstance('ect_link');
$L->label('My example Link');
$L->page(23);
$content .= $L->makeAnkerTag();
$url = $L->makeUrl();


full usage:

// construct

$L = t3lib_div::makeInstance('ect_link');

//settings: the order is unimportant

$L->label('My example Link');
$L->titleAttribute('The link title');
$L->classAttribute('myclass');
$L->targetAttribute('_blank');
$L->page('pagealias');
$L->prefix('tx_example_extension');
$L->parameters($this->piVars);    // keep piVars
$L->overrule(array( 'var1' => 1, 'var2' => 22);

// gettings

$content .= $L->makeAnkerTag();
$url = $L->makeUrl();

// destruct

unset($L);


How do you like it?


Warning:

Multidemensional parameters still need to be implemented.
This is still not working:

?tx_my[var][]=5&tx_my[var][]=8&tx_my[var][]=17


Now I hope for your ideas and contributions for our common ECT
library. Contributes of new classes should get their own login if that
is technically possible.



Regards

Elmar




















More information about the TYPO3-team-extension-coordination mailing list