api.php — translateBoards()

This commit is contained in:
Nikolay 2025-09-30 17:53:17 +03:00 committed by GitHub
parent 2c57e84ac5
commit 90a47bbb8b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -208,4 +208,24 @@ class Api {
return $apiCatalog;
}
public function translateBoard(Board $board) {
$apiBoard = [];
foreach ($boards as $board) {
$apiBoard['uri'] = $board['uri'];
$apiBoard['title'] = $board['title'];
$apiBoard['subtitle'] = $board['subtitle'];
}
return $apiBoard;
}
public function translateBoards($boards) {
$apiBoards = [];
foreach ($boards as $board) {
$apiBoards[] = $this->translateBoard($board);
}
return $apiBoards;
}
}