2725 search results for Doctrine

17 lines | src/DataFixtures/UserFixture.php
// ... lines 1 - 2
namespace App\DataFixtures;
use Doctrine\Common\Persistence\ObjectManager;
class UserFixture extends BaseFixture
{
protected function loadData(ObjectManager $manager)
{
// ... lines 11 - 14
}
}
See Code Block in Script
80 lines | src/DataFixtures/ArticleFixtures.php
// ... lines 1 - 7
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
// ... lines 9 - 10
class ArticleFixtures extends BaseFixture implements DependentFixtureInterface
{
// ... lines 13 - 72
public function getDependencies()
{
return [
TagFixture::class,
];
}
}
See Code Block in Script
// ... lines 1 - 5
use Doctrine\ORM\EntityManager;
// ... lines 7 - 17
class WeirdFormAuthenticator extends AbstractGuardAuthenticator
{
private $em;
// ... lines 21 - 22
public function __construct(EntityManager $em, RouterInterface $router)
{
$this->em = $em;
// ... line 26
}
// ... lines 28 - 99
}
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))
// ... lines 188 - 191
}
// ... lines 193 - 215
}
See Code Block in Script
34 lines | config/packages/doctrine.yaml
// ... lines 1 - 7
doctrine:
// ... lines 9 - 16
orm:
// ... lines 18 - 20
mappings:
// ... lines 22 - 27
AppBundle:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/AppBundle/Entity'
prefix: 'AppBundle\Entity'
alias: AppBundle
See Code Block in Script
56 lines | config/services.yaml
// ... lines 1 - 17
App\:
// ... lines 19 - 23
App\Controller\:
// ... lines 25 - 33
App\Service\MarkdownTransformer:
// ... lines 35 - 37
App\Doctrine\HashPasswordListener:
// ... lines 39 - 40
App\Form\TypeExtension\HelpFormExtension:
// ... lines 42 - 44
App\Service\MessageManager:
// ... lines 46 - 49
App\EventSubscriber\AddNiceHeaderEventSubscriber:
// ... lines 51 - 56
See Code Block in Script
71 lines | composer.json
{
// ... lines 2 - 30
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0",
"doctrine/data-fixtures": "^1.1",
"hautelook/alice-bundle": "^1.3"
},
// ... lines 38 - 69
}
See Code Block in Script
// ... lines 1 - 4
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
26 lines | src/AppBundle/Entity/User.php
<?php
// ... lines 2 - 4
use Doctrine\ORM\Mapping as ORM;
// ... lines 6 - 7
/**
* @ORM\Entity
* @ORM\Table(name="`user`")
*/
class User extends BaseUser
{
// ... lines 14 - 18
protected $id;
// ... lines 20 - 24
}
See Code Block in Script
223 lines | src/AppBundle/Entity/User.php
// ... lines 1 - 4
use Doctrine\Common\Collections\ArrayCollection;
// ... lines 6 - 16
class User implements UserInterface
{
// ... lines 19 - 214
/**
* @return ArrayCollection|Genus[]
*/
public function getStudiedGenuses()
{
return $this->studiedGenuses;
}
}
See Code Block in Script
71 lines | src/AppBundle/Entity/GenusScientist.php
// ... lines 1 - 2
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="genus_scientist")
*/
class GenusScientist
{
// ... lines 13 - 70
}
See Code Block in Script
71 lines | src/AppBundle/Entity/GenusScientist.php
// ... lines 1 - 2
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
// ... lines 6 - 10
class GenusScientist
{
// ... lines 13 - 17
private $id;
// ... lines 19 - 23
private $genus;
// ... lines 25 - 29
private $user;
// ... lines 31 - 34
private $yearsStudied;
// ... lines 36 - 70
}
See Code Block in Script
224 lines | src/AppBundle/Entity/Genus.php
// ... lines 1 - 5
use Doctrine\Common\Collections\Criteria;
// ... lines 7 - 15
class Genus
{
// ... lines 18 - 214
public function getExpertScientists()
{
$criteria = Criteria::create()
->andWhere(Criteria::expr()->gt('yearsStudied', 20))
// ... lines 219 - 221
}
}
See Code Block in Script
78 lines | composer.json
{
// ... lines 2 - 35
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0",
"doctrine/data-fixtures": "^1.1",
"hautelook/alice-bundle": "^1.3"
},
// ... lines 43 - 76
}
See Code Block in Script
// ... lines 1 - 6
class BaseController extends Controller
{
/**
* @return \Doctrine\Common\Persistence\ObjectManager|object
*/
protected function getEntityManager()
{
$em = $this->getDoctrine()->getManager();
return $em;
}
}
See Code Block in Script
// ... lines 1 - 6
class BaseController extends Controller
{
/**
* @return \Doctrine\Common\Persistence\ObjectManager|object
*/
protected function getEm()
{
$em = $this->getDoctrine()->getManager();
return $em;
}
}
See Code Block in Script
22 lines | src/DataFixtures/BaseFixture.php
// ... lines 1 - 2
namespace App\DataFixtures;
// ... lines 4 - 5
use Doctrine\Common\Persistence\ObjectManager;
abstract class BaseFixture extends Fixture
{
// ... lines 10 - 14
public function load(ObjectManager $manager)
{
// ... lines 17 - 19
}
}
See Code Block in Script
80 lines | src/AppBundle/Entity/GenusNote.php
// ... lines 1 - 2
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="genus_note")
*/
class GenusNote
{
// ... lines 13 - 78
}
See Code Block in Script
263 lines | features/bootstrap/FeatureContext.php
// ... lines 1 - 35
/**
* @BeforeScenario
*/
public function clearData()
{
$purger = new ORMPurger($this->getContainer()->get('doctrine')->getManager());
$purger->purge();
}
/**
* @BeforeScenario @fixtures
*/
public function loadFixtures()
// ... lines 49 - 263
See Code Block in Script
166 lines | src/Entity/DragonTreasure.php
// ... lines 1 - 4
use ApiPlatform\Doctrine\Orm\Filter\BooleanFilter;
use ApiPlatform\Metadata\ApiFilter;
// ... lines 7 - 38
#[ApiFilter(BooleanFilter::class, properties: ['isPublished'])]
class DragonTreasure
{
// ... lines 42 - 164
}
See Code Block in Script