Commit 9745a123 authored by Andrej Vyšný's avatar Andrej Vyšný

no message

parent 3f29d81a
<?php
namespace App\Plugins\ExamplePlugin\Controller\Admin;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* Class DefaultController
* @package App\Plugins\ExamplePlugin\Controller\Admin
*/
class AdminController extends AbstractController
{
}
<?php
namespace App\Plugins\ExamplePlugin\Controller\Web;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* Class DefaultController
* @package App\Plugins\ExamplePlugin\Controller\Web
*/
class WebController extends AbstractController
{
}
<?php
namespace App\Plugins\ExamplePlugin\Controller\Widget;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
/**
* Class DefaultController
* @package App\Plugins\ExamplePlugin\Controller\Widget
*/
class WidgetController extends AbstractController
{
}
<?php
use App\Plugins\ExamplePlugin\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Class Example
* AppBundle\Entity
* @ORM\Entity(repositoryClass="App\Plugins\ExamplePlugin\Repository\ExampleRepository")
* @ORM\Table(name="example")
*/
class Example
{
/**
* @var integer
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
}
\ No newline at end of file
<?php
namespace App\Plugins\ExamplePlugin\Form;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
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\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Validator\Constraints\NotBlank;
class ExampleType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name', TextType::class, [
'attr' => [
'class' => 'form-control'
],
])
;
}
}
\ No newline at end of file
<?php
namespace App\Plugins\ExamplePlugin\Repository;
use App\Plugins\ExamplePlugin\Entity\Example;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Common\Persistence\ManagerRegistry;
class ExampleRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, Example::class);
}
}
{% extends 'base.html.twig' %}
{% block body %}
<!-- Your CONTENT -->
{% endblock %}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment