2709 search results for Doctrine

217 lines | src/Entity/Article.php
// ... lines 1 - 6
use Doctrine\Common\Collections\Criteria;
// ... lines 8 - 14
class Article
{
// ... lines 17 - 183
public function getNonDeletedComments(): Collection
{
$criteria = Criteria::create()
->andWhere(Criteria::expr()->eq('isDeleted', false))
->orderBy(['createdAt' => 'DESC'])
;
return $this->comments->matching($criteria);
}
// ... lines 193 - 215
}
See Code Block in Script
217 lines | src/Entity/Article.php
// ... lines 1 - 6
use Doctrine\Common\Collections\Criteria;
// ... lines 8 - 14
class Article
{
// ... lines 17 - 183
public function getNonDeletedComments(): Collection
{
$criteria = Criteria::create()
->andWhere(Criteria::expr()->eq('isDeleted', false))
->orderBy(['createdAt' => 'DESC'])
;
// ... lines 190 - 191
}
// ... lines 193 - 215
}
See Code Block in Script
118 lines | src/AppBundle/Entity/User.php
// ... lines 1 - 4
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
// ... lines 6 - 10
/**
// ... lines 12 - 13
* @UniqueEntity(fields={"email"}, message="It looks like your already have an account!")
*/
class User implements UserInterface
// ... lines 17 - 118
See Code Block in Script
28 lines | src/AppBundle/Entity/Dinosaur.php
// ... lines 1 - 2
namespace AppBundle\Entity;
// ... line 4
use Doctrine\ORM\Mapping as ORM;
// ... line 6
/**
* @ORM\Entity
* @ORM\Table(name="dinosaurs")
*/
class Dinosaur
{
/**
* @ORM\Column(type="integer")
*/
private $length = 0;
// ... lines 17 - 26
}
See Code Block in Script
41 lines | app/config/services.yml
// ... lines 1 - 5
services:
// ... lines 7 - 21
app.doctrine.hash_password_listener:
class: AppBundle\Doctrine\HashPasswordListener
tags:
- { name: doctrine.event_subscriber }
app.form.help_form_extenion:
class: AppBundle\Form\TypeExtension\HelpFormExtension
tags:
- { name: form.type_extension, extended_type: Symfony\Component\Form\Extension\Core\Type\FormType }
// ... lines 31 - 41
See Code Block in Script
// ... lines 1 - 2
namespace AppBundle\Service;
use Doctrine\Common\Cache\Cache;
use Knp\Bundle\MarkdownBundle\MarkdownParserInterface;
class MarkdownTransformer
{
// ... lines 10 - 12
public function __construct(MarkdownParserInterface $markdownParser, Cache $cache)
{
// ... lines 15 - 16
}
// ... lines 18 - 33
}
See Code Block in Script
services:
app.markdown_transformer: '@AppBundle\Service\MarkdownTransformer'
app.markdown_extension: '@AppBundle\Twig\MarkdownExtension'
app.security.login_form_authenticator: '@AppBundle\Security\LoginFormAuthenticator'
app.doctrine.hash_password_listener: '@AppBundle\Doctrine\HashPasswordListener'
app.form.help_form_extenion: '@AppBundle\Form\TypeExtension\HelpFormExtension'
See Code Block in Script
services:
app.markdown_transformer: '@AppBundle\Service\MarkdownTransformer'
app.markdown_extension: '@AppBundle\Twig\MarkdownExtension'
app.security.login_form_authenticator: '@AppBundle\Security\LoginFormAuthenticator'
app.doctrine.hash_password_listener: '@AppBundle\Doctrine\HashPasswordListener'
app.form.help_form_extenion: '@AppBundle\Form\TypeExtension\HelpFormExtension'
See Code Block in Script
41 lines | src/AppBundle/Form/UserEditForm.php
// ... lines 1 - 6
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
// ... lines 8 - 14
class UserEditForm extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
// ... lines 20 - 24
->add('studiedGenuses', EntityType::class, [
// ... lines 26 - 29
])
;
}
// ... lines 33 - 39
}
See Code Block in Script
// ... lines 1 - 2
namespace AppBundle\Repository;
use Doctrine\ORM\EntityRepository;
class UserRepository extends EntityRepository
{
public function createIsScientistQueryBuilder()
{
return $this->createQueryBuilder('user')
->andWhere('user.isScientist = :isScientist')
->setParameter('isScientist', true);
}
}
See Code Block in Script
61 lines | src/AppBundle/Form/GenusFormType.php
// ... lines 1 - 7
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
// ... lines 9 - 16
class GenusFormType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
// ... lines 22 - 44
->add('genusScientists', EntityType::class, [
// ... lines 46 - 48
'choice_label' => 'email',
])
;
}
// ... lines 53 - 59
}
See Code Block in Script
60 lines | src/AppBundle/Form/GenusFormType.php
// ... lines 1 - 7
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
// ... lines 9 - 16
class GenusFormType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
// ... lines 22 - 44
->add('genusScientists', EntityType::class, [
// ... lines 46 - 48
])
;
}
// ... lines 52 - 58
}
See Code Block in Script
79 lines | src/AppBundle/Entity/GenusScientist.php
// ... lines 1 - 5
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
// ... lines 7 - 8
/**
// ... lines 10 - 11
* @UniqueEntity(
* fields={"genus", "user"},
* message="This user is already studying this genus",
* errorPath="user"
* )
*/
class GenusScientist
{
// ... lines 20 - 78
}
See Code Block in Script
78 lines | src/AppBundle/Entity/GenusScientist.php
// ... lines 1 - 5
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
// ... lines 7 - 8
/**
// ... lines 10 - 11
* @UniqueEntity(
* fields={"genus", "user"},
* message="This user is already studying this genus"
* )
*/
class GenusScientist
{
// ... lines 19 - 77
}
See Code Block in Script
43 lines | src/AppBundle/Form/GenusFormType.php
// ... lines 1 - 4
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
// ... lines 6 - 10
class GenusFormType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
// ... line 16
->add('subFamily', EntityType::class, [
// ... lines 18 - 22
])
// ... lines 24 - 32
;
}
// ... lines 35 - 41
}
See Code Block in Script
50 lines | src/AppBundle/Form/GenusFormType.php
// ... lines 1 - 6
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
// ... lines 8 - 13
class GenusFormType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
// ... line 19
->add('subFamily', EntityType::class, [
'placeholder' => 'Choose a Sub Family',
// ... lines 22 - 25
])
// ... lines 27 - 39
;
}
// ... lines 42 - 48
}
See Code Block in Script
50 lines | src/AppBundle/Form/GenusFormType.php
// ... lines 1 - 6
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
// ... lines 8 - 13
class GenusFormType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name')
->add('subFamily', EntityType::class, [
// ... lines 21 - 25
])
// ... lines 27 - 39
;
}
// ... lines 42 - 48
}
See Code Block in Script
75 lines | src/Controller/ArticleController.php
// ... lines 1 - 8
use Doctrine\ORM\EntityManagerInterface;
// ... lines 10 - 16
class ArticleController extends AbstractController
{
// ... lines 19 - 61
/**
* @Route("/news/{slug}/heart", name="article_toggle_heart", methods={"POST"})
*/
public function toggleArticleHeart(Article $article, LoggerInterface $logger, EntityManagerInterface $em)
{
// ... lines 67 - 72
}
}
See Code Block in Script
101 lines | src/Controller/ArticleController.php
// ... lines 1 - 7
use Doctrine\ORM\EntityManagerInterface;
// ... lines 9 - 15
class ArticleController extends AbstractController
{
// ... lines 18 - 35
/**
* @Route("/news/{slug}", name="article_show")
*/
public function show($slug, MarkdownHelper $markdownHelper, SlackClient $slack, EntityManagerInterface $em)
{
// ... lines 41 - 86
}
// ... lines 88 - 99
}
See Code Block in Script
33 lines | src/AppBundle/Form/BattleType.php
// ... lines 1 - 5
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
// ... lines 7 - 10
class BattleType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('programmer', EntityType::class, [
'class' => 'AppBundle\Entity\Programmer'
])
// ... lines 19 - 21
;
}
// ... lines 24 - 31
}
See Code Block in Script