PluginProbe
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration / 1.20
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration v1.20
2.1.0 2.0.15 2.0.12 2.0.10 2.0.4 2.0.1 2.0.0 1.95.3 1.95.2 1.95 1.91.6 trunk 1.11 1.12 1.13 1.20 1.21 1.22 1.23 1.30 1.31 1.32 1.35 1.40 1.41 All 42 releases
fluent-boards / app / Services / Intergrations / FluentCRM / DeepIntegration.php

DeepIntegration.php in FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration 1.20, at app/Services/Intergrations/FluentCRM/DeepIntegration.php

39 lines 897 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentBoards\App\Services\Intergrations\FluentCRM;
4
5
6 use FluentBoards\App\Models\Board;
7
8 class DeepIntegration
9 {
10 public function init()
11 {
12 add_filter('fluentcrm_ajax_options_boards', [$this, 'getBoards'], 10, 3);
13 }
14
15 public function getBoards($records, $search, $includeIds)
16 {
17 $query = Board::select(['id', 'title']);
18
19 if (!empty($search)) {
20 $query->where('title', 'like', "%$search%");
21 }
22
23 $boards = $query->orderBy('title', 'ASC')->get();
24
25 return $this->getFormattedBoards($boards);
26 }
27
28 public function getFormattedBoards($boards)
29 {
30 $formattedBoards = [];
31 foreach ($boards as $board) {
32 $formattedBoards[] = [
33 'id' => strval($board->id),
34 'title' => $board->title
35 ];
36 }
37 return $formattedBoards;
38 }
39 }