atk4\data\Reference_Many::getOurValue PHP Method

getOurValue() protected method

Returns our field value or id.
protected getOurValue ( ) : mixed
return mixed
    protected function getOurValue()
    {
        if ($this->owner->loaded()) {
            return $this->our_field ? $this->owner[$this->our_field] : $this->owner->id;
        } else {
            // create expression based on existing conditions
            return $this->owner->action('field', [$this->our_field ?: $this->owner->id_field]);
        }
    }