<?php

namespace App\Controller\Admin;

use App\Entity\Quotes;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractCrudController;
use EasyCorp\Bundle\EasyAdminBundle\Field\IdField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextEditorField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;

/**
 *
 */
class QuotesCrudController extends AbstractCrudController
{
	public static function getEntityFqcn(): string
	{
		return Quotes::class;
	}
	
	public function configureFields(string $pageName): iterable
	{
		yield IdField::new(propertyName: 'id')
			->onlyOnIndex();
		yield TextField::new(propertyName: 'quote')
			->onlyOnIndex();
		yield TextEditorField::new(propertyName: 'quote')
			->onlyOnForms();
	}
}
