replace annotation with attributes
This commit is contained in:
parent
450972ca1e
commit
58de4e8908
|
@ -12,13 +12,13 @@ doctrine:
|
|||
mappings:
|
||||
App\Core\Entity:
|
||||
is_bundle: false
|
||||
type: annotation
|
||||
type: attribute
|
||||
dir: '%kernel.project_dir%/vendor/murph/murph-core/src/core/Entity'
|
||||
prefix: 'App\Core\Entity'
|
||||
alias: App\Core\Entity
|
||||
App\Entity:
|
||||
is_bundle: false
|
||||
type: annotation
|
||||
type: attribute
|
||||
dir: '%kernel.project_dir%/src/Entity'
|
||||
prefix: '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\Routing\Annotation\Route;
|
||||
|
||||
/**
|
||||
* @Route("/admin")
|
||||
*/
|
||||
#[Route(path: '/admin')]
|
||||
class DashboardAdminController extends Controller
|
||||
{
|
||||
/**
|
||||
* @Route("/", name="admin_dashboard_index")
|
||||
*/
|
||||
#[Route(path: '/', name: 'admin_dashboard_index')]
|
||||
public function index(): Response
|
||||
{
|
||||
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 Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
*/
|
||||
#[ORM\Entity]
|
||||
class SimplePage extends Page
|
||||
{
|
||||
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\UserInterface;
|
||||
|
||||
/**
|
||||
* @ORM\Entity(repositoryClass=UserRepository::class)
|
||||
* @ORM\HasLifecycleCallbacks()
|
||||
*/
|
||||
#[ORM\Entity(repositoryClass: UserRepository::class)]
|
||||
#[ORM\HasLifecycleCallbacks]
|
||||
class User implements PasswordAuthenticatedUserInterface, UserInterface, TwoFactorInterface, EntityInterface
|
||||
{
|
||||
use Timestampable;
|
||||
/**
|
||||
* @ORM\Id
|
||||
* @ORM\GeneratedValue
|
||||
* @ORM\Column(type="integer")
|
||||
*/
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column(type: 'integer')]
|
||||
private $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=180, unique=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 180, unique: true)]
|
||||
private $email;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="json")
|
||||
*/
|
||||
#[ORM\Column(type: 'json')]
|
||||
private $roles = [];
|
||||
|
||||
/**
|
||||
* @var string The hashed password
|
||||
* @ORM\Column(type="string")
|
||||
*/
|
||||
#[ORM\Column(type: 'string')]
|
||||
private $password;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $displayName;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $totpSecret;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime", nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'datetime', nullable: true)]
|
||||
private $passwordRequestedAt;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
*/
|
||||
#[ORM\Column(type: 'string', length: 255, nullable: true)]
|
||||
private $confirmationToken;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", options={"default"=0})
|
||||
*/
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
|
||||
private $isAdmin;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="boolean", options={"default"=0})
|
||||
*/
|
||||
#[ORM\Column(type: 'boolean', options: ['default' => 0])]
|
||||
private $isWriter;
|
||||
|
||||
public function __construct()
|
||||
|
|
Loading…
Reference in New Issue