Jarves\Storage\Propel::getNestedSubCondition PHP Method

getNestedSubCondition() public method

So we include with this condition all entries 'inside' the entry defined through $condition.
public getNestedSubCondition ( Condition $condition ) : Condition
$condition Jarves\Configuration\Condition
return Jarves\Configuration\Condition
    public function getNestedSubCondition(Condition $condition)
    {
        $result = new Condition(null, $this->jarves);
        $sub = new ConditionSubSelect(null, $this->jarves);
        $sub->select('sub.lft');
        $sub->addSelfJoin('sub', 'sub.lft BETWEEN %table%.lft+1 AND %table%.rgt-1');
        $sub->setRules($condition->getRules());
        $subCondition = new Condition();
        $subCondition->addAnd(['lft', 'IN', $sub]);
        $result->addAnd($subCondition);
        return $result;
    }