In my own extension i need to include some of the deleted elements in the list view.
I have included this in the domian model
/**
* @var bool
*/
protected $deleted;
/**
* @return int
*/
public function getDeleted()
{
return $this->deleted;
}
/**
* @param bool $deleted
*/
public function setDeleted($deleted)
{
$this->deleted = $deleted;
}
And in the repository I have this
$query = $this->createQuery();
$query->getQuerySettings()->setIncludeDeleted(true);
if($sort==""){$sort = "make";}
$query->statement('SELECT tx_origcarinfo_domain_model_car.*
FROM tx_origcarinfo_domain_model_car
WHERE categories LIKE "%'.$cat.'%"
AND ((hidden = 0 AND deleted = 0) OR (deleted = 1 AND tstamp > '.(date("U")-1209600).'))
GROUP by car_id
ORDER by '.$sort
);
}
return $query->execute();
But if I debug my output deleted is NULL in every element.