List All Model Items inc Trashed.

@return \Illuminate\Http\Response
518766
public function getAll()
    {
        if (!$this->modelAdmin->hasSoftDeleting()) {
            return $this->missingMethod();
        }

        return view('flare::admin.modeladmin.all', [
                                                        'modelItems' => $this->modelAdmin->allItems(),
                                                        'totals' => $this->modelAdmin->totals(),
                                                    ]
                                            );
    }
544433
public function garbageCollector() {
		$conditions = [
			$this->getAlias() . '.created <' => date(FORMAT_DB_DATETIME, time() - $this->validity),
		];
		return $this->deleteAll($conditions);
	}
86301
public function flushAction()
    {
        $helper = new FlushCatalogueCacheHelper($this->cacheDir);
        $removedCount = $helper();

        $response = [
            'info' => sprintf('Looking in %s', $this->cacheDir),
            'message' => sprintf('OK (%d cache items removed)', $removedCount),
        ];

        return new JsonResponse($response);
    }
199182
public function trashed()
    {
        $field = $this->getDeleteTimeField();

        if ($field && !empty($this->getOrigin($field))) {
            return true;
        }

        return false;
    }
195161
public function deleteAll()
    {
        $this->preDeleteAll();
        $result = $this->dataStore->deleteAll();

        return $this->postDeleteAll($result);
    }
1256286
public function delete_cached_model(){
    $args = \func_get_args();

    foreach ( $args as $a ){
      if ( \is_string($a) && \strlen($a) ){
        $path = $a;
      }
      else if ( \is_array($a) ){
        $data = $a;
      }
    }
    if ( !isset($path) ){
      $path = $this->path;
    }
    else if ( strpos($path, './') === 0 ){
      $path = $this->say_dir().substr($path, 1);
    }
    if ( !isset($data) ){
      $data = $this->data;
    }
    return $this->mvc->delete_cached_model($path, $data, $this);
  }
230609
public function trashAction()
    {
        /** @var AbstractAdmin $admin */
        $admin = $this->getAdmin();

        $admin->checkAccess('undelete');

        /** @var EntityManager $em */
        $em = $this->get('doctrine')->getManager();

        $filters = $em->getFilters();

        if ($filters->isEnabled('softdeleteable')) {
            $filters->disable('softdeleteable');
        }

        if (!$filters->isEnabled('softdeleteabletrash')) {
            $filters->enable('softdeleteabletrash');
        }

        /** @var SoftDeleteableTrashFilter $softdeleteabletrash */
        $softdeleteabletrash = $filters->getFilter('softdeleteabletrash');

        $softdeleteabletrash->enableForEntity($admin->getClass());

        $datagrid = $admin->getDatagrid();
        $formView = $datagrid->getForm()->createView();

        // set the theme for the current Admin Form
        $this->get('twig')->getExtension(FormExtension::class)->renderer->setTheme($formView, $admin->getFilterTheme());

        return $this->renderWithExtraParams('@CompoSonataAdmin/CRUD/trash.html.twig', [
            'action' => 'trash',
            'form' => $formView,
            'datagrid' => $datagrid,
            'csrf_token' => $this->getCsrfToken('sonata.batch'),
        ]);
    }
328418
public function deleteList()
    {
        $process = $this->params()->fromQuery('process');
        $levels = $this->params()->fromQuery('levels');
        $nbDeleted = 0;
        
        if (! empty($process) && ! empty($levels)) {
            
            $process = explode(',', $process);
            $process = array_map(function ($proces)
            {
                $parts = array_merge(explode('-', $proces), array(
                    null,
                    null,
                    null
                ));
                return array(
                    'mode' => $parts[0],
                    'type' => $parts[1],
                    'endpoint' => $parts[2]
                );
            }, $process);
            $levels = explode(',', $levels);
            $nbDeleted = $this->getAlertDataHandler()->removeAllAlerts($process, $levels);
        }
        
        $deleted = array(
            "deleted" => $nbDeleted
        );
        $response = $this->getResponse();
        $response->getHeaders()->addHeaderLine('Content-Type', 'application/json');
        $serializer = $this->getSerializer();
        $alertssJson = $serializer->serialize($deleted, 'json');
        $response->setContent($alertssJson);
        return $response;
    }
645338
public function viewCleanup()
    {
        $path = sprintf('/%s/_view_cleanup', $this->databaseName);
        $response = $this->httpClient->request('POST', $path);
        if ($response->status >= 400) {
            throw HTTPException::fromResponse($path, $response);
        }

        return $response->body;
    }
273935
public function getListItems()
    {
        // Create List:
        
        $items = ArrayList::create();
        
        // Obtain Items from Source:
        
        if ($source = $this->owner->getSource()) {
            
            // Obtain Source List:
            
            $list = $source->getListItems();
            
            // Filter List Items (if applicable):
            
            if (in_array(ListFilter::class, class_uses($source))) {
                
                if ($where = $source->getListWhere()) {
                    $list = $list->where($where);
                }
                
                foreach ($source->getListFilters() as $filter) {
                    $list = $list->filter($filter);
                }
                
            }
            
            // Merge List Items:
            
            $items->merge($list);
            
        }
        
        // Sort Items (if applicable):
        
        if ($this->owner->SortItemsBy) {
            $items = $this->sort($items);
        }
        
        // Remove Items without Images (if applicable):
        
        if ($this->owner->ImageItems) {
            
            $items = $items->filterByCallback(function ($item) {
                return $item->hasMetaImage();
            });
            
        }
        
        // Reverse Items (if applicable):
        
        if ($this->owner->ReverseItems) {
            $items = $items->reverse();
        }
        
        // Limit Items (if applicable):
        
        if ($limit = $this->owner->NumberOfItems) {
            $items = $items->limit($limit);
        }
        
        // Paginate Items (if applicable):
        
        if ($this->owner->PaginateItems && $this->owner->SortItemsBy != self::SORT_RANDOM) {
            
            $items = PaginatedList::create($items, $this->getRequest());
            
            $items->setPaginationGetVar($this->owner->getPaginationGetVar());
            
            if ($this->owner->ItemsPerPage) {
                $items->setPageLength($this->owner->ItemsPerPage);
            }
            
        }
        
        // Associate Items with Rendering Component:
        
        foreach ($items as $item) {
            $item->setRenderer($this->owner);
        }
        
        // Answer List:
        
        return $items;
    }
502814
public function actionDeleteIn()
    {
        $selected = Yii::$app->request->post('selected' , []);

        $ret = \yongtiger\admin\models\Log::deleteAll(['id' => explode(',', $selected)]);
        $str = $ret > 0 ? ' (IDs [' . $selected . '])' : '';
        Yii::$app->session->setFlash('info', Module::t('message', 'Deleted {0} logs.', $ret) . $str);

        return $this->redirect(['index']);
    }
1249089
public function getModels()
    {
        $all = new Models();

        foreach ($this->items as $item) {
            $all->addAll($item->getCurrentAndOriginal());
        }

        return $all;
    }
544772
public function index()
    {
        $id = request('menu_id');
        $models = $this->repository->where('menu_id', $id)->orderBy('position')->findAll()->nest();

        return response()->json($models, 200);
    }
478811
public function list(): ResponseInterface
    {
        return $this->viewResponse('admin/modules', [
            'title'           => I18N::translate('All modules'),
            'modules'         => $this->module_service->all(true),
            'deleted_modules' => $this->module_service->deletedModules(),
        ]);
    }
1344691
private function trashCollect()
    {
        if ($this->cfg['trashCollect']) {
            if (!empty($_SERVER['REDIRECT_STATUS']) && $_SERVER['REDIRECT_STATUS'] == '404') {
                // this is a 404 page... likely casued by a missing asset on the "calling" page
                $this->debug->warn('404 - not trash collecting');
                return;
            }
            $this->persist->trashCollect();
        }
    }
615468
public function trashed($related = [], $perPage = 0)
    {
        $trashed = $this->model->onlyTrashed()->with($related);
        return $perPage ? $trashed->paginate($perPage) : $trashed->get();
    }
605889
public function index()
    {
        $items = $this->service->all();

        return $this->response()->collection($items, $this->transformer);
    }