Created
September 30, 2015 07:54
-
-
Save larascasse/0ef2a46415f0aef29275 to your computer and use it in GitHub Desktop.
Pumicer object csv export customization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private function csvAction(){ | |
$this->disableLayout(); | |
$this->disableViewAutoRender(); | |
$obj_list = new YourObject_List(); | |
$obj_list->load(); | |
/* @var $obj Object_YourObject */ | |
$out = array(); | |
foreach($obj_list as $obj){ | |
$entry = array(); | |
$entry["key"] = $obj->getKey(); | |
$entry["Field 1"] = $obj->getField1(); | |
$entry["Field 2"] = $obj->getField2(); | |
$entry["Field 3"] = $obj->getField3(); | |
$out[]=$entry; | |
} | |
$this->_helper->Csv($out, "produkt"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment