看板初始化提交

This commit is contained in:
zephyr
2026-06-01 21:23:12 -07:00
commit 54a842f4ab
2104 changed files with 241695 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace Kanboard\Formatter;
use Kanboard\Core\Filter\FormatterInterface;
/**
* Class TaskListFormatter
*
* @package Kanboard\Formatter
* @author Frederic Guillot
*/
class TaskListFormatter extends BaseFormatter implements FormatterInterface
{
/**
* Apply formatter
*
* @access public
* @return array
*/
public function format()
{
$tasks = $this->query->findAll();
$taskIds = array_column($tasks, 'id');
$tags = $this->taskTagModel->getTagsByTaskIds($taskIds);
array_merge_relation($tasks, $tags, 'tags', 'id');
return $tasks;
}
}