atk4\data\Reference_Many::ref PHP Method

ref() public method

Returns referenced model with condition set.
public ref ( array $defaults = [] ) : Model
$defaults array Properties
return Model
    public function ref($defaults = [])
    {
        return $this->getModel($defaults)->addCondition($this->their_field ?: $this->owner->table . '_id', $this->getOurValue());
    }