Filter | Description | Example |
---|---|---|
allintext | Searches for occurrences of all the keywords given. | allintext:"keyword" |
intext | Searches for the occurrences of keywords all at once or one at a time. | intext:"keyword" |
inurl | Searches for a URL matching one of the keywords. | inurl:"keyword" |
allinurl | Searches for a URL matching all the keywords in the query. | allinurl:"keyword" |
intitle | Searches for occurrences of keywords in title all or one. | intitle:"keyword" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# @experimental in 5.3 #} | |
{% use 'form_div_layout.html.twig' %} | |
{%- block form_row -%} | |
{%- set row_attr = row_attr|merge({ class: row_attr.class|default(row_class|default('mb-6')) }) -%} | |
{{- parent() -}} | |
{%- endblock form_row -%} | |
{%- block widget_attributes -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$countries = [ | |
Countries::getName('BJ') => 'BJ', | |
Countries::getName('BF') => 'BF', | |
Countries::getName('BI') => 'BI', | |
Countries::getName('CM') => 'CM', | |
Countries::getName('CF') => 'CF', | |
Countries::getName('CG') => 'CG', | |
Countries::getName('CD') => 'CD', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Repository; | |
use App\Entity\DisallowCountry; | |
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | |
use Doctrine\Persistence\ManagerRegistry; | |
use Exception; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Entity; | |
use App\Repository\DisallowCountryRepository; | |
use Doctrine\ORM\Mapping as ORM; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\DataFixtures; | |
use App\Domain\Application\Entity\DisallowCountry; | |
use Doctrine\Bundle\FixturesBundle\Fixture; | |
use Doctrine\Persistence\ObjectManager; | |
use Symfony\Component\Intl\Countries; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\EventListener; | |
use App\Repository\DisallowCountryRepository; | |
use GeoIp2\Database\Reader; | |
use GeoIp2\Exception\AddressNotFoundException; | |
use MaxMind\Db\Reader\InvalidDatabaseException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="POST" action="/profile"> | |
@csrf | |
... | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Symfony\Component\HttpFoundation\Request; | |
// ... | |
public function delete(Request $request) | |
{ | |
$submittedToken = $request->request->get('token'); | |
// "delete-item" est la même valeur que celle utilisée dans le modèle pour générer le jeton | |
if ($this->isCsrfTokenValid('delete-item', $submittedToken)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="{{ path('admin_post_delete', { id: post.id }) }}" method="post"> | |
{# l'argument de csrf_token() est une chaîne arbitraire utilisée pour générer le toke #} | |
<input type="hidden" name="token" value="{{ csrf_token('delete-item') }}"/> | |
<button type="submit">Delete item</button> | |
</form> |
NewerOlder