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 DigitalKanban\BaseBundle\Form\Type; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilder; | |
use Doctrine\ORM\EntityRepository; | |
use DigitalKanban\BaseBundle\Entity\User; | |
class UserType 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
/** @var $user sfGuardUser */ | |
$user = $this->getUser()->getGuardUser(); |
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
jQuery(function( $ ){ | |
var $$resize_callback_set = false; | |
var $$timer = null; | |
var $$callbacks = []; | |
$.fn.appendAround = function(opts){ | |
return this.each(function(){ | |
var $self = $( this ), | |
att = "data-set", | |
$set = $( "["+ att +"='"+ $self.closest( "["+ att +"]" ).attr( att ) + "']" ); |
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
class MediaServerFilter extends sfFilter | |
{ | |
public function execute ($filterChain) | |
{ | |
$filterChain->execute(); | |
// Execute this filter only once | |
if ($this->isFirstCall()) | |
{ | |
// Filters don't have direct access to the request and user objects. | |
// You will need to use the context object to get them |
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\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
class WelcomeController extends Controller | |
{ | |
public function indexAction() | |
{ |
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 | |
/* ... */ | |
final public function isGranted($attributes, $object = null) | |
{ | |
if (null === $this->token) { | |
throw new AuthenticationCredentialsNotFoundException('The security context contains no authentication token. One possible reason may be that there is no firewall configured for this URL.'$ | |
} |
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
before 'symfony:composer:update', 'symfony:copy_vendors' | |
namespace :symfony do | |
desc "Copy vendors from previous release" | |
task :copy_vendors, :except => { :no_release => true } do | |
pretty_print "--> Copying vendors from previous release if exists" | |
run "if [ -d #{previous_release}/vendor ]; then cp -a #{previous_release}/vendor #{latest_release}/vendor; fi" | |
puts_ok | |
end | |
end |
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
before 'symfony:composer:update', 'symfony:copy_vendors' | |
namespace :symfony do | |
desc "Copy vendors from previous release" | |
task :copy_vendors, :except => { :no_release => true } do | |
pretty_print "--> Copying vendors from previous release if exists" | |
run "cp -a #{previous_release}/vendor #{latest_release}/vendor" | |
puts_ok |
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
AGENTRUNNING=`ps x | grep agent | grep -v grep` | |
if [ -z "$AGENTRUNNING" ]; then | |
/usr/bin/ssh-agent -s > $HOME/.ssh/agent-env.sh | |
fi | |
source $HOME/.ssh/agent-env.sh |
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
user: | |
class: myUser | |
param: | |
timeout: 7200 |