Added method to RuleTrigger object as well

This commit is contained in:
Robert Horlings 2016-02-17 13:03:02 +01:00
parent 7c8c82edd7
commit 70e72c246d

View File

@ -36,4 +36,12 @@ class RuleTrigger extends Model
{ {
return $this->belongsTo('FireflyIII\Models\Rule'); return $this->belongsTo('FireflyIII\Models\Rule');
} }
/**
* Checks whether this trigger will match all transactions
* For example: amount > 0 or description starts with ''
*/
public function matchesAnything() {
return TriggerFactory::getTrigger($this, new TransactionJournal)->matchesAnything();
}
} }