src/RepeaterFieldType.php
/**
     * Handle saving the form data ourselves.
     *
     * @param FormBuilder $builder
     */
Handle saving the form data ourselves.
Handle saving the form data ourselves .
public function handle(FormBuilder $builder)
    {
        $entry = $builder->getFormEntry();
        if (!$forms = $this->getInputValue()) {
            $entry->{$this->getField()} = null;
            return;
        }
        foreach ($forms->getForms() as $form) {
            $skips = $form
                ->getFormFields()
                ->selfHandling()
                ->fieldSlugs();
            $form->setSkips($skips);
        }
        $forms->handle();
        $entry->{$this->getField()} = $forms->getForms()->map(
            function ($builder) {
                return $builder->getFormEntryId();
            }
        )->all();
    }
public function handle ( FormBuilder $ builder ) { $ entry = $ builder -> getFormEntry ( ) ; if ( ! $ forms = $ this -> getInputValue ( ) ) { $ entry -> { $ this -> getField ( ) } = null ; return ; } foreach ( $ forms -> getForms ( ) as $ form ) { $ skips = $ form -> getFormFields ( ) -> selfHandling ( ) -> fieldSlugs ( ) ; $ form -> setSkips ( $ skips ) ; } $ forms -> handle ( ) ; $ entry -> { $ this -> getField ( ) } = $ forms -> getForms ( ) -> map ( function ( $ builder ) { return $ builder -> getFormEntryId ( ) ; } ) -> all ( ) ; }
Handle saving the form data ourselves.
Handle saving the form data ourselves .
/**
         * If we don't have any forms then
         * there isn't much we can do.
         */ /**
         * Skip self handling field types since they
         * will handle themselves later. Otherwise
         * this causes some mad recursion issues.
         *
         * @var FormBuilder $form
         */ /**
         * Handle the post action
         * for all the child forms.
         */ // See the accessor for how IDs are handled. /* @var FormBuilder $builder */