public static function getList($config = [])
{
if (is_array($config)) {
$listClass = "Pimcore\\Model\\Asset\\Listing";
$list = \Pimcore::getDiContainer()->make($listClass);
$list->setValues($config);
$list->load();
return $list;
}
}
public function portletModifiedAssetsAction() { $list = Asset::getList(["limit" => 10, "order" => "DESC", "orderKey" => "modificationDate"]); $response = []; $response["assets"] = []; foreach ($list as $doc) { $response["assets"][] = ["id" => $doc->getId(), "type" => $doc->getType(), "path" => $doc->getRealFullPath(), "date" => $doc->getModificationDate(), "condition" => "userModification = '" . $this->getUser()->getId() . "'"]; } $this->_helper->json($response); }