Skip to content

Instantly share code, notes, and snippets.

@werty1st
Last active August 29, 2015 14:07
Show Gist options
  • Save werty1st/6fd63b1246917a32b9bc to your computer and use it in GitHub Desktop.
Save werty1st/6fd63b1246917a32b9bc to your computer and use it in GitHub Desktop.
save notelist items as raw array to store items in db on processFormData hook
contao3/system/modules/metamodelsattribute_notelist/FormMetaModelNotelist.php
Zeile 272
...
$arrNotelist = $arrTmp;
unset($arrTmp);
//aufbereiten um als array verfügbar zu halten
$items_raw = array();
foreach ($arrNotelist as $key => $value) {
$items_raw[] = $arrNotelist[$key]["data"];
}
$this->Session->set('catalog_notelist_raw', $items_raw);
$objTemplate->entries = $arrNotelist;
...
class delete_notelist extends Backend
{
public function notelist_remove($arrPost, $arrForm, $arrFiles)
{
$rawdata = \Session::getInstance()->get('catalog_notelist_raw');
echo"<pre>";
var_dump($rawdata);
echo"</pre>";
die("delete_notelist");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment