*/ public function getLayout(): array { $systemDefault = $this->config->getAppValue('dashboard', 'layout', 'recommendations,spreed,mail,calendar'); return array_values(array_filter(explode(',', $this->config->getUserValue($this->userId, 'dashboard', 'layout', $systemDefault)), fn (string $value) => $value !== '')); } /** * @return list */ public function getStatuses() { $configStatuses = $this->config->getUserValue($this->userId, 'dashboard', 'statuses', ''); try { // Parse the old format /** @var array $statuses */ $statuses = json_decode($configStatuses, true, 512, JSON_THROW_ON_ERROR); // We avoid getting an empty array as it will not produce an object in UI's JS return array_keys(array_filter($statuses, static fn (bool $value) => $value)); } catch (JsonException $e) { return array_values(array_filter(explode(',', $configStatuses), fn (string $value) => $value !== '')); } } }