Share » Forums » Developer » eZmatrix attribute and export to csv

eZmatrix attribute and export to csv

eZmatrix attribute and export to csv

Tuesday 07 August 2007 1:55:43 am - 1 reply

Modified on Tuesday 07 August 2007 1:56:19 am by laurent le cadet

Author Message

laurent le cadet

Tuesday 07 August 2007 2:39:27 am

replying to myself :

<?
class eZMatrixHandler extends BaseHandler {

	function exportAttribute(&$attribute) {
		$content  = $attribute->content();
		$rows = $content->attribute( 'rows' );
		foreach( $rows['sequential'] as $row )
        {
            $matrixArray[] = eZStringUtils::implodeStr( $row['columns'], '|' );
        }

        return eZStringUtils::implodeStr( $matrixArray, '&' );
		return $this->escape( $matrixArray );
	}
}

?>

A copy/paste from ezmatriwtype.php.

Hope this help

Laurent

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu