This file contains hidden or 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
{# 1: Setup --------------------------------- #} | |
{# https://clipboardjs.com/ #} | |
{# 2: Input group -------------------------- #} | |
<div class="input-group"> | |
<label for="vcsRepo" class="input-group-label">{{ entity.vcsSystem }}:</label> | |
<input type="text" class="input-group-field" id="vcsRepo" name="vcsRepo" value="{{ entity.vcsRepo }}" /> | |
<div class="input-group-button"> | |
<button id="copyRepo" | |
data-clipboard-target="#vcsRepo" |
This file contains hidden or 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 MyBundle\Form\Extension; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\OptionsResolver\OptionsResolver; | |
use Symfony\Component\Form\Extension\Core\Type\DateTimeType; | |
/** | |
* Class FlatpickrDateTimeType | |
* @package MyBundle\Form\Extension |
This file contains hidden or 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
monolog: | |
handlers: | |
main: | |
type: rotating_file | |
path: %kernel.logs_dir%/%kernel.environment%.log | |
level: error | |
max_files: 10 | |
action_level: error | |
bubble: true | |
grouped: |
This file contains hidden or 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
monolog: | |
handlers: | |
main: | |
type: rotating_file | |
path: %kernel.logs_dir%/%kernel.environment%.log | |
level: error | |
max_files: 10 | |
action_level: error | |
bubble: true | |
slack: |
This file contains hidden or 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
// controller delete action: | |
use Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException; | |
... | |
try { | |
$em->remove($entity); | |
$em->flush(); | |
} catch(ForeignKeyConstraintViolationException $e) { | |
$this->addFlash('warning', 'This item is in use by related entities and cannot be deleted.'); | |
} |
This file contains hidden or 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 | |
/** | |
* Created by PhpStorm. | |
* User: grayloon | |
* Date: 9/3/16 | |
* Time: 7:39 AM | |
* | |
* Set these routes up!! | |
* # froala receive route for file uploads | |
* froala_receiver: |
This file contains hidden or 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
// ---- | |
// Sass (v3.4.21) | |
// Compass (v1.0.3) | |
// ---- | |
.box { | |
@for $i from 0 through 9 { | |
$c : $i + 1; | |
&:nth-child(#{$c}) { | |
order: (($i - $i % 3) / 3) + 1; |
This file contains hidden or 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
@mixin alphaColor ($name,$color) { | |
@for $i from 1 through 10 { | |
.c-#{$name}-#{$i} { | |
color: rgba($color,$i/10); | |
} | |
} | |
} | |
@include alphaColor("blue",blue); | |
@include alphaColor("red",#ed1414); |
This file contains hidden or 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
/** | |
* @param $amt | |
* @return string | |
* strips out non-numeric characters and adds the +1 country code. | |
*/ | |
function price($amt) | |
{ | |
return '<span class="dollar-sign">$</span>'.number_format($amt,2); | |
} |