replace annotation with attributes
This commit is contained in:
parent
450972ca1e
commit
58de4e8908
|
@ -12,13 +12,13 @@ doctrine:
|
||||||
mappings:
|
mappings:
|
||||||
App\Core\Entity:
|
App\Core\Entity:
|
||||||
is_bundle: false
|
is_bundle: false
|
||||||
type: annotation
|
type: attribute
|
||||||
dir: '%kernel.project_dir%/vendor/murph/murph-core/src/core/Entity'
|
dir: '%kernel.project_dir%/vendor/murph/murph-core/src/core/Entity'
|
||||||
prefix: 'App\Core\Entity'
|
prefix: 'App\Core\Entity'
|
||||||
alias: App\Core\Entity
|
alias: App\Core\Entity
|
||||||
App\Entity:
|
App\Entity:
|
||||||
is_bundle: false
|
is_bundle: false
|
||||||
type: annotation
|
type: attribute
|
||||||
dir: '%kernel.project_dir%/src/Entity'
|
dir: '%kernel.project_dir%/src/Entity'
|
||||||
prefix: 'App\Entity'
|
prefix: 'App\Entity'
|
||||||
alias: App\Entity
|
alias: App\Entity
|
||||||
|
|
|
@ -6,14 +6,10 @@ use App\Core\Controller\Dashboard\DashboardAdminController as Controller;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
|
||||||
/**
|
#[Route(path: '/admin')]
|
||||||
* @Route("/admin")
|
|
||||||
*/
|
|
||||||
class DashboardAdminController extends Controller
|
class DashboardAdminController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
#[Route(path: '/', name: 'admin_dashboard_index')]
|
||||||
* @Route("/", name="admin_dashboard_index")
|
|
||||||
*/
|
|
||||||
public function index(): Response
|
public function index(): Response
|
||||||
{
|
{
|
||||||
return $this->render('admin/dashboard.html.twig');
|
return $this->render('admin/dashboard.html.twig');
|
||||||
|
|
|
@ -11,9 +11,7 @@ use App\Core\Form\Site\Page\TextBlockType;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
|
||||||
/**
|
#[ORM\Entity]
|
||||||
* @ORM\Entity
|
|
||||||
*/
|
|
||||||
class SimplePage extends Page
|
class SimplePage extends Page
|
||||||
{
|
{
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
|
|
|
@ -10,64 +10,44 @@ use Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface;
|
||||||
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||||
use Symfony\Component\Security\Core\User\UserInterface;
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
|
|
||||||
/**
|
#[ORM\Entity(repositoryClass: UserRepository::class)]
|
||||||
* @ORM\Entity(repositoryClass=UserRepository::class)
|
#[ORM\HasLifecycleCallbacks]
|
||||||
* @ORM\HasLifecycleCallbacks()
|
|
||||||
*/
|
|
||||||
class User implements PasswordAuthenticatedUserInterface, UserInterface, TwoFactorInterface, EntityInterface
|
class User implements PasswordAuthenticatedUserInterface, UserInterface, TwoFactorInterface, EntityInterface
|
||||||
{
|
{
|
||||||
use Timestampable;
|
use Timestampable;
|
||||||
/**
|
#[ORM\Id]
|
||||||
* @ORM\Id
|
#[ORM\GeneratedValue]
|
||||||
* @ORM\GeneratedValue
|
#[ORM\Column(type: 'integer')]
|
||||||
* @ORM\Column(type="integer")
|
|
||||||
*/
|
|
||||||
private $id;
|
private $id;
|
||||||
|
|
||||||
/**
|
#[ORM\Column(type: 'string', length: 180, unique: true)]
|
||||||
* @ORM\Column(type="string", length=180, unique=true)
|
|
||||||
*/
|
|
||||||
private $email;
|
private $email;
|
||||||
|
|
||||||
/**
|
#[ORM\Column(type: 'json')]
|
||||||
* @ORM\Column(type="json")
|
|
||||||
*/
|
|
||||||
private $roles = [];
|
private $roles = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string The hashed password
|
* @var string The hashed password
|
||||||
* @ORM\Column(type="string")
|
|
||||||
*/
|
*/
|
||||||
|
#[ORM\Column(type: 'string')]
|
||||||
private $password;
|
private $password;
|
||||||
|
|
||||||
/**
|
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||||
* @ORM\Column(type="string", length=255, nullable=true)
|
|
||||||
*/
|
|
||||||
private $displayName;
|
private $displayName;
|
||||||
|
|
||||||
/**
|
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||||
* @ORM\Column(type="string", length=255, nullable=true)
|
|
||||||
*/
|
|
||||||
private $totpSecret;
|
private $totpSecret;
|
||||||
|
|
||||||
/**
|
#[ORM\Column(type: 'datetime', nullable: true)]
|
||||||
* @ORM\Column(type="datetime", nullable=true)
|
|
||||||
*/
|
|
||||||
private $passwordRequestedAt;
|
private $passwordRequestedAt;
|
||||||
|
|
||||||
/**
|
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||||
* @ORM\Column(type="string", length=255, nullable=true)
|
|
||||||
*/
|
|
||||||
private $confirmationToken;
|
private $confirmationToken;
|
||||||
|
|
||||||
/**
|
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
|
||||||
* @ORM\Column(type="boolean", options={"default"=0})
|
|
||||||
*/
|
|
||||||
private $isAdmin;
|
private $isAdmin;
|
||||||
|
|
||||||
/**
|
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
|
||||||
* @ORM\Column(type="boolean", options={"default"=0})
|
|
||||||
*/
|
|
||||||
private $isWriter;
|
private $isWriter;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
|
Loading…
Reference in a new issue