protected function processTrashcan($bean, $ownTrashcan)
{
foreach ($ownTrashcan as $trash) {
$myFieldLink = $bean->getMeta('type') . '_id';
$alias = $bean->getMeta('sys.alias.' . $trash->getMeta('type'));
if ($alias) {
$myFieldLink = $alias . '_id';
}
if ($trash->getMeta('sys.garbage') === true) {
$this->trash($trash);
} else {
$trash->{$myFieldLink} = NULL;
$this->store($trash);
}
}
}