Bolt\Legacy\Storage::searchAllContentTypes PHP Method

searchAllContentTypes() public method

public searchAllContentTypes ( array $parameters = [], &$pager = [] )
$parameters array
    public function searchAllContentTypes(array $parameters = [], &$pager = [])
    {
        // Note: we can only apply this kind of results aggregating when we don't
        // use LIMIT and OFFSET! If we'd want to use it, this should be rewritten.
        // Results aggregator
        $result = [];
        foreach ($this->getContentTypes() as $contenttype) {
            $contentTypeSearchResults = $this->searchContentType($contenttype, $parameters, $pager);
            foreach ($contentTypeSearchResults as $searchresult) {
                $result[] = $searchresult;
            }
        }
        return $result;
    }

Usage Example

Example #1
0
 public function testSearchAllContentTypes()
 {
     $app = $this->getApp();
     $app['request'] = Request::create('/');
     $storage = new Storage($app);
     $results = $storage->searchAllContentTypes(['title' => 'lorem']);
 }