MultipleFieldType Handler

jcastillotx - 2 months ago

I am trying to push only records that are not sponsored. So I declare my custom handler in my migration

‘sponsorship_child’          => [
                ‘type’   => ‘anomaly.field_type.multiple’,
                ‘config’ => [
                    ‘related’    => ChildModel::class,
                    ‘title_name’ => ‘name’,
                    ‘mode’       => ‘lookup’,
                    ‘handler’    => ‘Modules\SponsorshipsModule\Sponsorship\Support\MultipleFieldType\[email protected]’
                ]
            ],

My custom handler

@package Modules\SponsorshipsModule\Sponsorship\Support\MultipleFieldType
 */
class ChildMultiHandler {

    /***
     * @param \Anomaly\MultipleFieldType\MultipleFieldType                        $fieldType
     * @param \Modules\SponsorshipsModule\Child\Contract\ChildRepositoryInterface $children
     */
    public function handle(MultipleFieldType $fieldType, ChildRepositoryInterface $children) {

        $fieldType->setOptions(
            $children->getChildOptions()
        );

    }
}

I am not getting anything I want.

ryanthompson - 2 months ago

I'll have to check it out. Looks like a bug.