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
{% block form_rows %} | |
{% spaceless %} | |
{% for child in form if child.vars.block_prefixes.1 != 'submit' %} | |
{{ form_row(child) }} | |
{% endfor %} | |
{% for child in form if child.vars.block_prefixes.1 == 'submit' %} | |
{{ form_row(child) }} | |
{% endfor %} | |
{% endspaceless %} | |
{% endblock form_rows %} |
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 | |
function isRequired($object, $property, $validationGroups = ['Default']) | |
{ | |
$classMetadata = $this->validator->getMetadataFor($object); | |
$propertyMetadatas = $classMetadata->getPropertyMetadata($property); | |
foreach ($propertyMetadatas as $propertyMetadata) { | |
$constraintsByGroups = $propertyMetadata->constraintsByGroup; |
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="..." data-unsaved-warning> | |
<!-- Something something the form --> | |
</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 | |
// src/Tentacode/LolcatBundle/Form/CrazyCatLadyType.php | |
namespace Tentacode\LolcatBundle\Form; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
class CrazyCatLadyType extends AbstractType |
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 Context; | |
class RegistrationContext extends BaseContext | |
{ | |
/** | |
* @When I go to the registration page | |
*/ | |
public function iGoToTheRegistrationPage() |
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 Tentacode\Form; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\Form\DataTransformerInterface; | |
class PictureType extends AbstractType implements DataTransformerInterface | |
{ |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 Context; | |
use Behat\MinkExtension\Context\RawMinkContext; | |
use Behat\Testwork\Tester\Result\TestResult; | |
use Behat\Mink\Driver\Selenium2Driver; | |
class ScreenshotContext extends RawMinkContext | |
{ |
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 | |
// every thing before will be used in every child process | |
while(true) { | |
$pid = pcntl_fork(); | |
if ($pid === -1) { | |
die('Could not fork process'); | |
} elseif ($pid) { |
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 Pmsipilot\TestBundle\Command; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand, | |
Symfony\Component\HttpKernel\Util, | |
Symfony\Component\Console\Input\InputArgument, | |
Symfony\Component\Console\Input\InputOption, | |
Symfony\Component\Console\Input\InputInterface, | |
Symfony\Component\Console\Input\ArrayInput, |
OlderNewer