Attempted to load class “AbstactType” from namespace “bundle\Sbundle\Form”

368
28 января 2017, 12:13

Здравствуйте, помогите пжл с проблемой, вот код

<?php
namespace bundle\Sbundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use bundle\Sbundle\Entity\Enquiry;
use bundle\Sbundle\Form\EnquiryType;
use Symfony\Component\Form;

class PageController extends Controller
{
    public function indexAction()
    {
        return $this->render('SBundle:Page:index.html.twig');
    }
    public function aboutAction()
    {
        return $this->render('SBundle:Page:about.html.twig');
    }
    public function contactsAction(Request $request)
    {
        $enquiry = new Enquiry();
        $form = $this->createForm(EnquiryType::class, $enquiry);
        if($request->isMethod($request::METHOD_POST)){
            $form->handleRequest($request);
            if($form->isValid()){
                return $this->redirect($this->generateUrl('SBundle_contact'));
            }
        }
        return $this->render('SBundle:Page:contacts.html.twig',array(
            'form'=> $form->createView()
        ));
    }
}

вот класс

<?php
namespace bundle\Sbundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

class EnquiryType extends AbstactType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder->add('name','text');
        $builder->add('email','email');
        $builder->add('subject','text');
        $builder->add('body','textarea');
    }
    public function configureOptions(OptionsResolver $resolver){
    }
    public function getBlockPrefix(){
        return 'contact';    
    }
}

?>

выдает исключение Attempted to load class "AbstactType" from namespace "bundle\Sbundle\Form".Did you forget a "use" statement for another namespace?

READ ALSO
php FANN завершает работу без ошибок

php FANN завершает работу без ошибок

Если большое значение $num_neurons_hidden то выдает предупреждение -

274
Показ страницы после загрузки background-image

Показ страницы после загрузки background-image

Всем Здравствуйте, Как сделать так, чтобы background-image загружался до того как страница будет показана?

400
Вопрос преобразования типов в датах

Вопрос преобразования типов в датах

Получаю в JS переменную дату из msql DATETIME ввиде 2017-01-25 20:28:10 var supertime = "2017-01-25 20:28:10" - это строка, не дата

293