View openMap.js
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 lat = latitude | |
* @var lng = Longitude | |
* @var id = plotting multiple maps on a map | |
* If you are just using one map, you can remove the ID from here | |
* Logical function to plot points on openlayers map with support of USGS and Google Maps | |
*/ | |
function openMap(lat, lng, id) { | |
var layer; |
View gist:afe0a82602c35f2c1bea
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
{# Navigation Template - Output Template you created as menu #} | |
{{ knp_menu_render('CoreBundle:Builder:mainMenu', | |
{ | |
'template': 'CoreBundle:partials:knp_menu.html.twig', | |
'currentClass': 'nav-active' | |
}) | |
}} | |
{# knp_menu.html.twig #} |
View deploy.rb
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
set :application, "Test Application" | |
set :domain, "domain.com" | |
set :deploy_to, "/home/user/www/directory" | |
set :app_path, "app" | |
set :repository, "git@github.com/..." | |
set :scm, :git | |
set :scm_verbose, :true | |
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, or `none` |
View collection.php
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 Test\VehicleBundle\Form\Type; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\OptionsResolver\OptionsResolver; | |
class LicensesFormType extends AbstractType | |
{ |
View taxonomies.php
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 | |
if (isset($taxonomy['listing_records'])) { | |
$amount = $taxonomy['listing_records']; | |
} else { | |
$amount = $app['config']->get('general/listing_records'); | |
} | |
if (isset($taxonomy['listing_sort'])) { | |
$amount = $taxonomy['listing_sort']; |
View cartHandler.php
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 | |
public function storeInSession() | |
{ | |
if (! $this->session->isStarted()) { | |
$this->session->start(); | |
$this->initializeCart($this->session); | |
} else { | |
if (! $this->session->has('cart')) { | |
$this->initializeCart($this->session); |
View CartExample.php
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 FrontEnd\CartBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* CartItem | |
* | |
* @ORM\Table() |
View service.php
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 | |
use Doctrine\Common\Persistence\ObjectManager; | |
class Lead | |
{ | |
protected $POST_Data; | |
protected $_em; | |
View Passwords.php
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 | |
//UserAdmin Form | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
$builder | |
->add('email', 'email', array('label' => 'form.email', 'translation_domain' => 'FOSUserBundle')) | |
->add('username', null, array('label' => 'form.username', 'translation_domain' => 'FOSUserBundle')) |
View form.php
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 | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
if ($options['required']) { | |
$placeholder = 'test'; | |
} else { | |
$placeholder = 'nope'; | |
} |
OlderNewer