src/RepeaterFieldType.php
/**
     * Return a form builder instance.
     *
     * @param FieldInterface $field
     * @param null           $instance
     * @return FormBuilder
     */
Return a form builder instance.
@param FieldInterface $field
@param null           $instance
@return FormBuilder
Return a form builder instance . @param FieldInterface $field @param null $instance @return FormBuilder
public function form(FieldInterface $field, $instance = null)
    {
        $model = $this->getRelatedModel();
        $builder = $model->newRepeaterFieldTypeFormBuilder()
            ->setModel($model)
            ->setOption('success_message', false)
            ->setOption('repeater_instance', $instance)
            ->setOption('repeater_field', $field->getId())
            ->setOption('repeater_prefix', $this->getFieldName())
            ->setOption('prefix', $this->getFieldName() . '_' . $instance . '_');
        $builder
            ->setOption('form_view', $builder->getOption('form_view', 'anomaly.field_type.repeater::form'))
            ->setOption('wrapper_view', $builder->getOption('wrapper_view', 'anomaly.field_type.repeater::wrapper'));
        return $builder;
    }
public function form ( FieldInterface $ field , $ instance = null ) { $ model = $ this -> getRelatedModel ( ) ; $ builder = $ model -> newRepeaterFieldTypeFormBuilder ( ) -> setModel ( $ model ) -> setOption ( 'success_message' , false ) -> setOption ( 'repeater_instance' , $ instance ) -> setOption ( 'repeater_field' , $ field -> getId ( ) ) -> setOption ( 'repeater_prefix' , $ this -> getFieldName ( ) ) -> setOption ( 'prefix' , $ this -> getFieldName ( ) . '_' . $ instance . '_' ) ; $ builder -> setOption ( 'form_view' , $ builder -> getOption ( 'form_view' , 'anomaly.field_type.repeater::form' ) ) -> setOption ( 'wrapper_view' , $ builder -> getOption ( 'wrapper_view' , 'anomaly.field_type.repeater::wrapper' ) ) ; return $ builder ; }
Return a form builder instance.
Return a form builder instance .
/* @var EntryInterface $model */ /* @var FormBuilder $builder */