From 09a7f9ef85c192df9e870310d383f10fa844264d Mon Sep 17 00:00:00 2001 From: Anthony Legiret Date: Fri, 3 Nov 2017 09:25:04 +0100 Subject: Correct ProjectApiFormatter file name --- app/Formatter/ProjectApiFormatter.php | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 app/Formatter/ProjectApiFormatter.php (limited to 'app/Formatter/ProjectApiFormatter.php') diff --git a/app/Formatter/ProjectApiFormatter.php b/app/Formatter/ProjectApiFormatter.php new file mode 100644 index 00000000..5521d57c --- /dev/null +++ b/app/Formatter/ProjectApiFormatter.php @@ -0,0 +1,39 @@ +project = $project; + return $this; + } + + /** + * Apply formatter + * + * @access public + * @return mixed + */ + public function format() + { + if (! empty($this->project)) { + $this->project['url'] = array( + 'board' => $this->helper->url->to('BoardViewController', 'show', array('project_id' => $this->project['id']), '', true), + 'list' => $this->helper->url->to('TaskListController', 'show', array('project_id' => $this->project['id']), '', true), + ); + } + + return $this->project; + } +} -- cgit v1.2.3