{
content (id: 87) {
fields {
fieldDefIdentifier
value {
... on TextLineFieldValue {
value
}
... on RichTextFieldValue {
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
#!/usr/bin/php | |
<?php | |
printf("%sGit pre-commit hook %1\$s", PHP_EOL); | |
$projectName = basename(getcwd()); | |
exec('phpunit --configuration phpunit.xml', $output, $returnCode); // Assuming cwd here | |
if ($returnCode !== 0) { | |
$minimalTestSummary = array_pop($output); | |
printf("Test suite for %s failed: ", $projectName); | |
printf("( %s ) %s%2\$s", $minimalTestSummary, PHP_EOL); | |
return false; // exit(1); |
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
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
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 | |
// Given any image url, it returns the base64 image | |
function ParseImageURL() | |
{ | |
// $image_url = (isset($_REQUEST["image_url"]) && $_REQUEST["image_url"]!=null) ? $_REQUEST["image_url"] : null; | |
$image_url = "https://fbcdn-sphotos-a-a.akamaihd.net/hphotos-ak-prn1/t1/p526x296/1965014_10153859707455111_1422873058_n.jpg"; | |
// $image_url = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIWFRQBAwQEBgUGCgYGChAODA0QFA8OEAwNDQ8QDw0ODhANEA8MDA8PDxAQFA4VDw8PDhANDQ4ODRAQDw8UDhAMDA0MDP/AABEIACwALAMBEQACEQEDEQH/xAAaAAADAAMBAAAAAAAAAAAAAAAHCAkDBQYE/8QANBAAAQMDAwMCAwUJAQAAAAAAAQIDBAUGEQAHIQgSMRNBFCJxFzJCYYEVFiM0Q1FTcpEJ/8QAGgEAAgMBAQAAAAAAAAAAAAAAAwQABQYCAf/EACsRAAEDAwIEBQUBAAAAAAAAAAEAAgMREjEEIRNBUfBxgZGhwQUUImHRsf/aAAwDAQACEQMRAD8AfZtXA0wuFnR51FKrX3jd1N29s2uXRWFqbpVFgvVCUpsZV6baCtQSPdRAwB7kjUUUO7yvW/uszeebcc1Dji1r7I8NtwmPTI/4Gkk8ADyTgFSsnydIT6hkQq4+ATmn0z5zaweJ5BF66+gLcyltQbkiINXSyhC3YkBKlyEYGThJyFeM8YGST76Wh1okdu0jompdAWD8X |
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 | |
namespace Acme\DemoBundle\Admin; | |
use Sonata\AdminBundle\Admin\Admin; | |
class ElectricalEquipmentAdmin extends Admin | |
{ | |
public function getTemplate($name) | |
{ |