Former\Traits\Field::repopulate PHP Method

repopulate() private method

Use values stored in Former to populate the current field
private repopulate ( $fallback = null )
    private function repopulate($fallback = null)
    {
        // Get values from POST, populated, and manually set value
        $post = $this->app['former']->getPost($this->name);
        $populator = $this->form ? $this->form->getPopulator() : $this->app['former.populator'];
        $populate = $populator->get($this->bind ?: $this->name);
        // Assign a priority to each
        if (!is_null($post)) {
            return $post;
        }
        if (!is_null($populate)) {
            return $populate;
        }
        return $fallback ?: $this->value;
    }