2725 search results for Doctrine

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
// ... lines 1 - 2
namespace AppBundle\Pagination;
use Doctrine\ORM\QueryBuilder;
// ... lines 6 - 7
use Symfony\Component\HttpFoundation\Request;
// ... lines 9 - 10
class PaginationFactory
{
// ... lines 13 - 19
public function createCollection(QueryBuilder $qb, Request $request, $route, array $routeParams = array())
{
// ... lines 22 - 53
}
}
See Code Block in Script
// ... lines 1 - 5
use Doctrine\Common\Annotations\Reader;
// ... lines 7 - 12
class LinkSerializationSubscriber implements EventSubscriberInterface
{
private $router;
private $annotationReader;
// ... lines 18 - 20
public function __construct(RouterInterface $router, Reader $annotationReader)
{
$this->router = $router;
$this->annotationReader = $annotationReader;
// ... line 25
}
// ... lines 27 - 72
}
See Code Block in Script
57 lines | app/AppKernel.php
// ... lines 1 - 5
class AppKernel extends Kernel
{
public function registerBundles()
{
// ... lines 10 - 25
if (in_array($this->getEnvironment(), array('dev', 'test'), true)) {
// ... lines 27 - 30
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
}
// ... lines 33 - 34
}
// ... lines 36 - 55
}
See Code Block in Script
39 lines | src/Controller/MainController.php
// ... lines 1 - 6
use Pagerfanta\Doctrine\ORM\QueryAdapter;
// ... lines 8 - 14
class MainController extends AbstractController
{
// ... line 17
public function homepage(
// ... lines 19 - 23
): Response
{
$pager = Pagerfanta::createForCurrentPageWithMaxPerPage(
new QueryAdapter($voyageRepository->findBySearchQueryBuilder($query, $searchPlanets)),
$page,
10
);
// ... lines 31 - 36
}
}
See Code Block in Script
102 lines | src/Repository/FortuneCookieRepository.php
// ... lines 1 - 8
use Doctrine\Common\Collections\Criteria;
// ... lines 10 - 19
class FortuneCookieRepository extends ServiceEntityRepository
{
// ... lines 22 - 26
public static function createFortuneCookiesStillInProductionCriteria(): Criteria
{
return Criteria::create()
->andWhere(Criteria::expr()->eq('discontinued', false));
}
// ... lines 32 - 100
}
See Code Block in Script
169 lines | src/Entity/DragonTreasure.php
// ... lines 1 - 5
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
// ... lines 7 - 39
class DragonTreasure
{
// ... lines 42 - 48
#[ApiFilter(SearchFilter::class, strategy: 'partial')]
private ?string $name = null;
// ... lines 51 - 53
#[ApiFilter(SearchFilter::class, strategy: 'partial')]
private ?string $description = null;
// ... lines 56 - 167
}
See Code Block in Script
50 lines | src/Controller/SecurityController.php
// ... lines 1 - 4
use Doctrine\ORM\EntityManagerInterface;
use Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Totp\TotpAuthenticatorInterface;
// ... lines 7 - 12
class SecurityController extends BaseController
{
// ... lines 15 - 37
public function enable2fa(TotpAuthenticatorInterface $totpAuthenticator, EntityManagerInterface $entityManager)
{
// ... lines 40 - 47
}
}
See Code Block in Script
// ... lines 1 - 5
use Doctrine\ORM\QueryBuilder;
// ... lines 7 - 22
class UserCrudController extends AbstractCrudController
{
// ... lines 25 - 35
public function createIndexQueryBuilder(SearchDto $searchDto, EntityDto $entityDto, FieldCollection $fields, FilterCollection $filters): QueryBuilder
{
return parent::createIndexQueryBuilder($searchDto, $entityDto, $fields, $filters);
}
// ... lines 40 - 73
}
See Code Block in Script
// ... lines 1 - 5
use Doctrine\ORM\QueryBuilder;
// ... lines 7 - 12
class QuestionCrudController extends AbstractCrudController
{
// ... lines 15 - 19
public function configureFields(string $pageName): iterable
{
// ... lines 22 - 29
yield AssociationField::new('askedBy')
// ... lines 31 - 38
->setQueryBuilder(function (QueryBuilder $qb) {
// ... lines 40 - 41
});
// ... lines 43 - 44
}
}
See Code Block in Script
// ... lines 1 - 5
use App\Photo\PhotoFileManager;
use App\Photo\PhotoPonkaficator;
use Doctrine\ORM\EntityManagerInterface;
// ... lines 9 - 10
class AddPonkaToImageHandler implements MessageHandlerInterface
{
// ... lines 13 - 16
public function __construct(PhotoPonkaficator $ponkaficator, PhotoFileManager $photoManager, EntityManagerInterface $entityManager)
{
// ... lines 19 - 21
}
// ... lines 23 - 32
}
See Code Block in Script
... repository class. Triple-check that these are identical. 2) (this is the more likely cause) Doctrine is (for some reason) not seeing your `@ORM\Entity(repositoryClass="AppBundle\Repository\GenusNoteRepository")` annotation ...
weaverryan
weaverryan
Read Full Comment