atk4\data\Reference_One::init PHP Method

init() public method

Reference_One will also add a field corresponding to 'our_field' unless it exists of course.
public init ( )
    public function init()
    {
        parent::init();
        if (!$this->our_field) {
            $this->our_field = $this->link;
        }
        if (!$this->owner->hasElement($this->our_field)) {
            $this->owner->addField($this->our_field, ['type' => null, 'join' => $this->join, 'default' => $this->default, 'never_persist' => $this->never_persist, 'read_only' => $this->read_only, 'ui' => $this->ui, 'mandatory' => $this->mandatory, 'typecast' => $this->typecast, 'serialize' => $this->serialize, 'persist_format' => $this->persist_format, 'persist_timezone' => $this->persist_timezone, 'dateTimeClass' => $this->dateTimeClass, 'dateTimeZoneClass' => $this->dateTimeZoneClass]);
        }
    }