@@ 308-310 (lines=3) @@ | ||
305 | $ids = $this->request->query->get('selected'); |
|
306 | ||
307 | // check if input is array |
|
308 | if (!Obj::isArray($ids) || count($ids) < 1) { |
|
309 | throw new NotFoundException(__('Nothing to delete is founded')); |
|
310 | } |
|
311 | ||
312 | // get all records as object from db |
|
313 | $records = ContentEntity::find($ids); |
|
@@ 346-348 (lines=3) @@ | ||
343 | { |
|
344 | // get ids as array from GET |
|
345 | $ids = $this->request->query->get('selected'); |
|
346 | if (!Obj::isArray($ids) || count($ids) < 1) { |
|
347 | throw new NotFoundException(__('Items to publish is not found')); |
|
348 | } |
|
349 | ||
350 | // try to find items in db |
|
351 | $records = ContentEntity::whereIn('id', $ids)->where('display', '=', 0); |