Flag of Ukraine
SymfonyCasts stands united with the people of Ukraine
Next Chapter

Challenge #1 of 1


Q: 

Which fields will be rendered on the "detail" page of InvoiceCrudController if you have this config:

class InvoiceCrudController extends AbstractCrudController
{
    // ...
    public function configureFields(string $pageName): iterable
    {
        yield IdField::new('id')
            ->onlyOnIndex();
        yield MoneyField::new('total')
            ->setCurrency('USD');
        if ($pageName === 'detail') {
            yield EmailField::new('user.email', 'Email');
            yield BooleanField::new('wasEmailSent')
                ->onlyOnIndex()
                ->renderAsSwitch(false);
        }
        yield DateField::new('createdAt')
            ->hideOnForm();
        yield DateField::new('paidAt');
    }
}

userVoice