I am trying to create new content using Sonata Admin, however due the entity is an abstract class I am getting on screen a new panel with title Select object type and the content has a blue box that says No object types available.
I don't know what kind of settings I need to set-up in order to be able to select and create one of the entities that are extending my abstract class.
Any help will be more than welcomed!
AppBundle\Entity\AbstractAlert
/**
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(
* name="dtype",
* type="string"
* )
* @ORM\DiscriminatorMap({
* "email" = "AppBundle\Entity\EmailAlert",
* "sms" = "AppBundle\Entity\SmsAlert"
* })
*/
abstract class AbstractAlert
{
}
AppBundle\Entity\EmailAlert
class EmailAlert extends AbstractAlert
{
}
AppBundle\Entity\SmsAlert
class SmsAlert extends AbstractAlert
{
}
SonataAdminBundle\Admin\AlertAdmin
class MassiveAlertAdmin extends AbstractAdmin
{
protected function configureFormFields(FormMapper $form)
{
$form
->with('panel name')
->add('fieldName')
->end();
}
}
This is how it looks my Sonata Admin => Create page
If any of you can give me a clue please, I will appreciate it.
Thanks in advance for your help,