-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Darkenend/develop
Develop
- Loading branch information
Showing
8 changed files
with
122 additions
and
19 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace App\Form; | ||
|
||
use App\Entity\Conversation; | ||
use App\Entity\User; | ||
use Symfony\Bridge\Doctrine\Form\Type\EntityType; | ||
use Symfony\Component\Form\AbstractType; | ||
use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
use Symfony\Component\Form\FormBuilderInterface; | ||
use Symfony\Component\OptionsResolver\OptionsResolver; | ||
|
||
class ConversationType extends AbstractType | ||
{ | ||
public function buildForm(FormBuilderInterface $builder, array $options) | ||
{ | ||
$builder | ||
->add('user', EntityType::class, [ | ||
'class' => User::class | ||
]) | ||
->add('topic', TextType::class) | ||
->add('submit', SubmitType::class) | ||
; | ||
} | ||
|
||
public function configureOptions(OptionsResolver $resolver) | ||
{ | ||
$resolver->setDefaults([ | ||
'data_class' => Conversation::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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{% extends 'base.html.twig' %} | ||
|
||
{% block title %}RLM | Create Conversation{% endblock %} | ||
|
||
{% block body %} | ||
<nav aria-label="breadcrumb"> | ||
<ol class="breadcrumb bg-light"> | ||
<li class="breadcrumb-item"> | ||
<a href="{{ path('user_home') }}"> | ||
Home | ||
</a> | ||
</li> | ||
<li class="breadcrumb-item"> | ||
<a href="{{ path('message_home') }}"> | ||
Message Board | ||
</a> | ||
</li> | ||
<li class="breadcrumb-item active" aria-current="page"> | ||
Create Conversation | ||
</li> | ||
</ol> | ||
</nav> | ||
{{ form_start(form) }} | ||
<div class="row"> | ||
<div class="col-3"> | ||
{{ form_row(form.user) }} | ||
</div> | ||
<div class="col"> | ||
{{ form_row(form.topic) }} | ||
</div> | ||
</div> | ||
{{ form_row(form.submit) }} | ||
{{ form_end(form) }} | ||
{% endblock %} |
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