Skip to content

Instantly share code, notes, and snippets.

@javiereguiluz
javiereguiluz / file1.txt
Created February 27, 2019 10:45
Created via API
Demo
<?php
// This code was originally posted in a comment of this blog post:
// https://symfony.com/blog/new-in-symfony-5-2-true-colors-in-the-console
final class Rgb
{
private $red;
private $green;
private $blue;
<?php
class BlogPostCrudController extends AbstractCrudController
{
// ...
// Thanks to this method, admin users can see all blog posts but
// the rest of users can only see their blog posts
public function createIndexQueryBuilder(SearchDto $searchDto, EntityDto $entityDto, FieldCollection $fields, FilterCollection $filters): QueryBuilder
{
<script>
document.addEventListener('DOMContentLoaded', function() {
const card = document.querySelector('#intro-image-wrapper');
const motionMatchMedia = window.matchMedia('(prefers-reduced-motion)');
const buffer = 10;
function handleHover(e) {
const { clientX, clientY, currentTarget } = e;
const { clientWidth, clientHeight, offsetLeft, offsetTop } = currentTarget;