This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function connectUser(){ | |
$pseudo = $_POST['pseudo']; | |
$password = $_POST['password']; | |
$manager = new UtilisateurManager(DBFactory::getMysql()); | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class LoadTrickData extends AbstractFixture | |
{ | |
public function load(ObjectManager $manager) | |
{ | |
$groupeGrabs = $this->getReference('groupe-grab'); | |
$groupeRotation = $this->getReference('groupe-rotation'); | |
$trickMute = new Tricks(); | |
$trickMute->setNom('Mute'); | |
$trickMute->setDescription('Saisie de la carre frontside de la planche entre les deux pieds avec la main avant.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TrickController extends Controller | |
{ | |
private $builder; | |
public function __construct(TricksBuilder $builder) | |
{ | |
$this->builder = $builder; | |
} | |
public function newTrickAction(Request $request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TrickController extends Controller | |
{ | |
private $builder; | |
public function __construct(TricksBuilder $builder) | |
{ | |
$this->builder = $builder; | |
} | |
public function createTrickAction(Request $request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Pour exemple mon formulaire a jout de trick | |
class TricksAddType extends AbstractType | |
{ | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
// On affiche les champs du builder | |
$builder | |
->add('nom', TextType::class) | |
->add('description', TextareaType::class) | |
->add('save', SubmitType::class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TricksAddType extends AbstractType | |
{ | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
// On affiche les champs du builder | |
$builder | |
->add('nom', TextType::class) | |
->add('description', TextareaType::class) | |
->add('groupe', CollectionType::class, array( | |
'entry_type' => GroupeAddType::class, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends 'base.html.twig' %} | |
{% block body %} | |
<div class="container-fluid"> | |
<div class="row well"> | |
<div class="col-md-8 col-md-offset-2"> | |
{{ form_start(form) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tricks.orm.yml | |
App\Entity\Tricks: | |
type: entity | |
# clé(s) primaire(s) | |
id: | |
id: | |
type: integer | |
generator: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Cette redirection marche | |
{% extends 'base.html.twig' %} | |
{% block stylesheets %} | |
{{ parent() }} | |
<link rel="stylesheet" href="{{ asset('css/styles.css') }}"> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#security.yaml | |
security: | |
encoders: | |
App\Entity\Utilisateur: | |
algorithm: bcrypt | |
providers: | |
our_db_provider: | |
entity: |
OlderNewer