1000 search results

<?php
namespace AppBundle\Doctrine;
class DiscontinuedFilter
{
}
See Code Block in Script
// ... lines 1 - 2
namespace AppBundle\Doctrine;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\Query\Filter\SQLFilter;
class DiscontinuedFilter extends SQLFilter
{
/**
* Gets the SQL query part to add to a query.
*
* @param ClassMetaData $targetEntity
* @param string $targetTableAlias
*
* @return string The constraint SQL if there is available, empty string otherwise.
*/
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
{
// ...
}
}
See Code Block in Script
// ... lines 1 - 7
class DiscontinuedFilter extends SQLFilter
{
// ... lines 10 - 17
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
{
var_dump($targetEntity);die;
}
}
See Code Block in Script
// ... lines 1 - 7
class DiscontinuedFilter extends SQLFilter
{
// ... lines 10 - 17
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
{
if ($targetEntity->getReflectionClass()->name != 'AppBundle\Entity\FortuneCookie') {
return '';
}
// ... lines 23 - 24
}
}
See Code Block in Script
// ... lines 1 - 17
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
{
if ($targetEntity->getReflectionClass()->name != 'AppBundle\Entity\FortuneCookie') {
return '';
}
return sprintf('%s.discontinued = false', $targetTableAlias);
}
// ... lines 26 - 27
See Code Block in Script
// ... lines 1 - 17
public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias)
{
// ... lines 20 - 23
return sprintf('%s.discontinued = %s', $targetTableAlias, $this->getParameter('discontinued'));
}
// ... lines 26 - 27
See Code Block in Script
31 lines | config/packages/doctrine.yaml
parameters:
# Adds a fallback DATABASE_URL if the env var is not set.
# This allows you to run cache:warmup even if your
# environment variables are not available yet.
# You should not need to change this value.
env(DATABASE_URL): ''
doctrine:
dbal:
// ... lines 10 - 17
# With Symfony 3.3, remove the `resolve:` prefix
url: '%env(resolve:DATABASE_URL)%'
// ... lines 20 - 31
See Code Block in Script
# Read the documentation: https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html
# See the official DoctrineExtensions documentation for more details: https://github.com/Atlantic18/DoctrineExtensions/tree/master/doc/
stof_doctrine_extensions:
default_locale: en_US
See Code Block in Script
# Read the documentation: https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html
# See the official DoctrineExtensions documentation for more details: https://github.com/Atlantic18/DoctrineExtensions/tree/master/doc/
stof_doctrine_extensions:
default_locale: en_US
orm:
default:
sluggable: true
See Code Block in Script
"Doctrine itself doesn't come with any pagination features." "Doctrine\ORM\Tools\Pagination\Paginator" is there at least from 2013 (version 2.4). It is very simple to compare with KnpPagination Bundle, but it is there. This pure doctrine paginator is also used in the…
Doctrine Behaviors 2 is out! https://www.tomasvotruba.cz/blog/2019/12/30/doctrine-behaviors-2-0-reloaded/
Tomáš Votruba
Tomáš Votruba
Read Full Comment
26 lines | app/config/config_prod.yml
// ... lines 1 - 3
#doctrine:
# orm:
# metadata_cache_driver: apc
# result_cache_driver: apc
# query_cache_driver: apc
// ... lines 9 - 26
See Code Block in Script
26 lines | app/config/config_prod.yml
// ... lines 1 - 3
doctrine:
orm:
metadata_cache_driver: apcu
# result_cache_driver: apc
query_cache_driver: apcu
// ... lines 9 - 26
See Code Block in Script
28 lines | app/config/config_test.yml
// ... lines 1 - 23
doctrine:
dbal:
url: 'sqlite:///%kernel.project_dir%/var/data/test.sqlite'
// ... lines 27 - 28
See Code Block in Script
80 lines | app/config/config.yml
// ... lines 1 - 67
doctrine_cache:
providers:
my_markdown_cache:
type: '%cache_type%'
file_system:
directory: '%kernel.cache_dir%/markdown_cache'
// ... lines 74 - 80
See Code Block in Script
72 lines | app/config/config.yml
// ... lines 1 - 43
# Doctrine Configuration
doctrine:
dbal:
driver: pdo_mysql
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
# if using pdo_sqlite as your database driver:
# 1. add the path in parameters.yml
# e.g. database_path: "%kernel.root_dir%/data/data.db3"
# 2. Uncomment database_path in parameters.yml.dist
# 3. Uncomment next line:
# path: "%database_path%"
// ... lines 60 - 72
See Code Block in Script
77 lines | app/config/config.yml
// ... lines 1 - 72
doctrine_cache:
providers:
// ... lines 75 - 77
See Code Block in Script
77 lines | app/config/config.yml
// ... lines 1 - 72
doctrine_cache:
providers:
my_markdown_cache:
// ... lines 76 - 77
See Code Block in Script
77 lines | app/config/config.yml
// ... lines 1 - 72
doctrine_cache:
providers:
my_markdown_cache:
type: file_system
See Code Block in Script
51 lines | app/config/config_dev.yml
// ... lines 1 - 46
doctrine_cache:
providers:
my_markdown_cache:
type: array
See Code Block in Script