public function getPredefinedPropertiesAction()
{
$properties = [];
$type = $this->getParam("controller");
$allowedTypes = ["asset", "document", "object"];
if (in_array($type, $allowedTypes)) {
$list = new Model\Property\Predefined\Listing();
$list->setFilter(function ($row) use($type) {
if ($row["ctype"] == $type) {
return true;
}
return false;
});
$list->load();
foreach ($list->getProperties() as $type) {
$properties[] = $type;
}
}
$this->_helper->json(["properties" => $properties]);
}