return $this->getSystemTypes($translated)[$type] ?? _T($type);
}
+ /**
+ * Get all known types
+ *
+ * @return array<string,string>
+ *
+ * @throws Throwable
+ */
+ public function getTypes(): array
+ {
+ $types = $this->getSystemTypes();
+
+ $select = $this->zdb->select(self::TABLE);
+ $select->quantifier('DISTINCT');
+ $select->where->notIn('type', array_keys($this->getSystemTypes(false)));
+ $results = $this->zdb->execute($select);
+
+ foreach ($results as $r) {
+ $types[$r->type] = $r->type;
+ }
+
+ return $types;
+ }
+
/**
* Handle files
*