protected function addQueryBuilderSearchResults(DataList $documents)
    {
        /** @var ManyManyList $originals Documents that belong to just this set. */
        $originals = $this->Documents();
        $originals->removeByFilter('"ManuallyAdded" = 0');

        foreach ($documents as $document) {
            $originals->add($document, array('ManuallyAdded' => 0));
        }

        return $originals;
    }
protected function addQueryBuilderSearchResults(DataList $documents)
    {
        /** @var ManyManyList $originals Documents that belong to just this set. */
        $originals = $this->Documents();
        $originals->removeByFilter('"ManuallyAdded" = 0');

        foreach ($documents as $document) {
            $originals->add($document, array('ManuallyAdded' => 0));
        }

        return $originals;
    }
protected function addQueryBuilderSearchResults ( DataList $ documents ) { /** @var ManyManyList $originals Documents that belong to just this set. */ $ originals = $ this -> Documents ( ) ; $ originals -> removeByFilter ( '"ManuallyAdded" = 0' ) ; foreach ( $ documents as $ document ) { $ originals -> add ( $ document , array ( 'ManuallyAdded' => 0 ) ) ; } return $ originals ; }
Remove all ManuallyAdded = 0 original results and add in the new documents returned by the search context

@param  DataList $documents
@return DataList
Remove all ManuallyAdded = 0 original results and add in the new documents returned by the search context