OEModule\OphCiExamination\models\OphCiExamination_VisualAcuity_Reading::loadClosest PHP Method

loadClosest() public method

Load model with closest base_values for current unit. This is to allow for switching units.
public loadClosest ( integer $unit_id = null )
$unit_id integer
    public function loadClosest($unit_id = null)
    {
        $base_value = $this->value;
        if ($base_value) {
            $value = $this->getClosest($base_value, $unit_id);
            $this->value = $value->base_value;
        }
    }