Path

ez projects / extract / forum / general / sckenhancedselection datatype


sckenhancedselection datatype

You need to be logged in to post messages in the forums. New users may register here.

Geoff Bentley

Member since:
08 December 2007

Posts: 46

Wednesday 27 May 2009 4:56:18 am

Here's a patch for adding the sckenhancedselection datatype:




Index: settings/csv.ini.append.php


===================================================================


--- settings/csv.ini.append.php (revision 2527)


+++ settings/csv.ini.append.php (revision 2528)


@@ -16,6 +16,7 @@


 ExportableDatatypes[]=ezidentifier


 ExportableDatatypes[]=ezenhancedobjectrelation


 ExportableDatatypes[]=ezenhancedselection


+ExportableDatatypes[]=sckenhancedselection


 ExportableDatatypes[]=ezselection


 ExportableDatatypes[]=ezenum


 ExportableDatatypes[]=ezcountry


@@ -36,6 +37,10 @@


 HandlerFile=ezstringhandler.php


 HandlerClass=eZStringHandler


 

+[sckenhancedselection]


+HandlerFile=sckenhancedselectionhandler.php


+HandlerClass=sckEnhancedSelectionHandler


+


 [ezinteger]


 HandlerFile=ezintegerhandler.php


 HandlerClass=eZIntegerHandler


Index: classes/parsers/sckenhancedselectionhandler.php


===================================================================


--- classes/parsers/sckenhancedselectionhandler.php     (revision 0)


+++ classes/parsers/sckenhancedselectionhandler.php     (revision 2528)


@@ -0,0 +1,12 @@


+<?


+


+class sckEnhancedSelectionHandler extends BaseHandler{


+


+      function exportAttribute( &$attribute )


+      {


+           $content = $attribute->content();


+           $content = (is_array($content) and count($content) == 1) ? $attribute->metaData() : $attribute->isA();


+           return $this->escape( (is_string($content)) ? $content : $content[1]['text'] );


+      }


+}


+?>


Up

Björn Dieding@xrow.de

Member since:
07 March 2003

Posts: 47

Friday 29 May 2009 2:39:20 pm

please send to patch to bjoern at xrow de

copy and paste is a pain in here

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Up

You need to be logged in to post messages in the forums. New users may register here.