We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 5 | trait Search |
||
| 6 | { |
||
| 7 | /* |
||
| 8 | |-------------------------------------------------------------------------- |
||
| 9 | | SEARCH |
||
| 10 | |-------------------------------------------------------------------------- |
||
| 11 | */ |
||
| 12 | |||
| 13 | public $ajax_table = true; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Add conditions to the CRUD query for a particular search term. |
||
| 17 | * |
||
| 18 | * @param [string] $searchTerm Whatever string the user types in the search bar. |
||
|
|
|||
| 19 | */ |
||
| 20 | public function applySearchTerm($searchTerm) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Apply the search logic for each CRUD column. |
||
| 35 | */ |
||
| 36 | public function applySearchLogicForColumn($query, $column, $searchTerm) |
||
| 74 | |||
| 75 | /** |
||
| 76 | * Tell the list view to use AJAX for loading multiple rows. |
||
| 77 | * |
||
| 78 | * @deprecated 3.3.0 All tables are AjaxTables starting with 3.3.0. |
||
| 79 | */ |
||
| 80 | 1 | public function enableAjaxTable() |
|
| 84 | |||
| 85 | /** |
||
| 86 | * Check if ajax is enabled for the table view. |
||
| 87 | * |
||
| 88 | * @deprecated 3.3.0 Since all tables use ajax, this will soon be removed. |
||
| 89 | * @return bool |
||
| 90 | */ |
||
| 91 | 2 | public function ajaxTable() |
|
| 95 | |||
| 96 | /** |
||
| 97 | * Get the HTML of the cells in a table row, for a certain DB entry. |
||
| 98 | * @param Entity $entry A db entry of the current entity; |
||
| 99 | * @return array Array of HTML cell contents. |
||
| 100 | */ |
||
| 101 | public function getRowViews($entry) |
||
| 127 | |||
| 128 | /** |
||
| 129 | * Get the HTML of a cell, using the column types. |
||
| 130 | * @param array $column |
||
| 131 | * @param Entity $entry A db entry of the current entity; |
||
| 132 | * @return HTML |
||
| 133 | */ |
||
| 134 | public function getCellView($column, $entry) |
||
| 138 | |||
| 139 | /** |
||
| 140 | * Get the name of the view to load for the cell |
||
| 141 | * @param $column |
||
| 142 | * @return string |
||
| 143 | */ |
||
| 144 | private function getCellViewName($column) |
||
| 145 | { |
||
| 146 | // return custom column from view attribute |
||
| 147 | if (isset($column['view_namespace']) && isset($column['type'])) { |
||
| 148 | return $column['view_namespace'] . '.' . $column['type']; |
||
| 149 | } |
||
| 150 | |||
| 151 | if (isset($column['type'])) { |
||
| 152 | // if the column has been overwritten return that one |
||
| 153 | if (view()->exists('vendor.backpack.crud.columns.' . $column['type'])) { |
||
| 154 | return 'vendor.backpack.crud.columns.' . $column['type']; |
||
| 155 | } |
||
| 156 | |||
| 157 | // return the column from the package |
||
| 158 | return 'crud::columns.' . $column['type']; |
||
| 159 | } |
||
| 160 | |||
| 161 | // fallback to text column |
||
| 162 | return 'crud::columns.text'; |
||
| 163 | } |
||
| 164 | |||
| 165 | /** |
||
| 166 | * Render the given view |
||
| 167 | * @param $view |
||
| 168 | * @param $column |
||
| 169 | * @param $entry |
||
| 170 | * @return mixed |
||
| 171 | */ |
||
| 172 | private function renderCellView($view, $column, $entry) |
||
| 184 | |||
| 185 | /** |
||
| 186 | * Created the array to be fed to the data table. |
||
| 187 | * |
||
| 188 | * @param $entries Eloquent results. |
||
| 189 | * @return array |
||
| 190 | */ |
||
| 191 | public function getEntriesAsJsonForDatatables($entries, $totalRows, $filteredRows) |
||
| 206 | } |
||
| 207 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.