adding trashed flag

This commit is contained in:
Jake Boyles
2016-01-19 13:48:09 -05:00
parent 97fdd406e3
commit c6d58e0c17
2 changed files with 41 additions and 8 deletions

View File

@ -28,6 +28,11 @@ class SearchBuilder
/**
* @var
*/
private $trashed = false;
/**
* @var
*/
private $config;
public function __construct(Repository $config)
@ -73,6 +78,19 @@ class SearchBuilder
return $this;
}
/**
* @param $trashed
*
* @return $this
*/
public function trashed()
{
$this->trashed = true;
return $this;
}
/**
* @param $table
* @param $searchFields
@ -104,7 +122,7 @@ class SearchBuilder
// Create a new instance of the selected drivers 'class' and pass
// through table and fields to search
$driverInstance = new $driver($this->table, $this->searchFields, $relevanceFieldName);
$driverInstance = new $driver($this->table, $this->searchFields, $relevanceFieldName,['*'],$this->trashed);
return $driverInstance;
}