1000 search results

202 lines | src/Entity/Article.php
// ... lines 1 - 4
use Doctrine\Common\Collections\ArrayCollection;
// ... lines 6 - 13
class Article
{
// ... lines 16 - 65
public function __construct()
{
$this->comments = new ArrayCollection();
}
// ... lines 70 - 200
}
See Code Block in Script
32 lines | src/DataFixtures/A0CommentFixture.php
// ... lines 1 - 6
use Doctrine\Common\DataFixtures\DependentFixtureInterface;
// ... lines 8 - 9
class A0CommentFixture extends BaseFixture implements DependentFixtureInterface
{
// ... lines 12 - 30
}
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()
// ... lines 187 - 191
}
// ... 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))
// ... lines 188 - 191
}
// ... 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
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
17 lines | src/DataFixtures/CommentFixture.php
// ... lines 1 - 4
use Doctrine\Common\Persistence\ObjectManager;
class CommentFixture extends BaseFixture
{
protected function loadData(ObjectManager $manager)
{
// ... lines 11 - 14
}
}
See Code Block in Script
95 lines | src/AppBundle/Entity/Subscription.php
// ... lines 1 - 4
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="subscription")
*/
class Subscription
{
/**
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\OneToOne(targetEntity="User", inversedBy="subscription")
* @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
*/
private $user;
/**
* @ORM\Column(type="string")
*/
private $stripeSubscriptionId;
/**
* @ORM\Column(type="string")
*/
private $stripePlanId;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $endsAt;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $billingPeriodEndsAt;
// ... lines 45 - 93
}
See Code Block in Script
// ... lines 1 - 6
use Doctrine\ORM\EntityManager;
class SubscriptionHelper
{
// ... lines 11 - 13
private $em;
public function __construct(EntityManager $em)
{
$this->em = $em;
// ... lines 19 - 30
}
// ... lines 32 - 61
}
See Code Block in Script
36 lines | src/AppBundle/Entity/StripeEventLog.php
// ... lines 1 - 4
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="stripe_event_log")
*/
class StripeEventLog
{
// ... lines 13 - 34
}
See Code Block in Script
// ... lines 1 - 2
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20160807113428 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE stripe_event_log (id INT AUTO_INCREMENT NOT NULL, stripe_event_id VARCHAR(255) NOT NULL, handled_at DATETIME NOT NULL, UNIQUE INDEX UNIQ_217D8BDC2CB034B8 (stripe_event_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('DROP TABLE stripe_event_log');
}
}
See Code Block in Script
31 lines | src/AppBundle/StripeClient.php
// ... lines 1 - 5
use Doctrine\ORM\EntityManager;
class StripeClient
{
private $em;
public function __construct(EntityManager $em)
{
$this->em = $em;
}
// ... lines 16 - 29
}
See Code Block in Script
63 lines | src/AppBundle/Entity/User.php
// ... lines 1 - 6
use Doctrine\ORM\Mapping as ORM;
// ... lines 8 - 63
See Code Block in Script
65 lines | composer.json
{
// ... lines 2 - 17
"require": {
// ... lines 19 - 22
"doctrine/doctrine-cache-bundle": "^1.2",
// ... lines 24 - 62
}
}
See Code Block in Script
81 lines | app/config/config.yml
// ... lines 1 - 75
stof_doctrine_extensions:
default_locale: en_US
orm:
default:
sluggable: true
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 - 82
public function __construct()
{
$this->studiedGenuses = new ArrayCollection();
}
// ... lines 87 - 221
}
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
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()
// ... lines 218 - 221
}
}
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
// ... 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