Skip to content

Instantly share code, notes, and snippets.


Jesus Manuel Olivas jmolivas

View GitHub Profile
jmolivas / EntityRepository.php
Created Mar 26, 2014
Entity repository extract
View EntityRepository.php
* @param integer $id
* @return array
public function findBySomething($id)
$queryBuilder = $this->queryBySomething($id);
return $queryBuilder->getQuery()->getResult();
jmolivas / Vagrantfile
Created Apr 29, 2014
Adding customizable configuration to Vagrantfile
View Vagrantfile
require "yaml"
parameter_file = "./parameters.yml"
parameters =
if File.exists?(parameter_file)
parameters = YAML::load_file(parameter_file)
# Apply configuration values if available
jmolivas / gist:90b406b459b76a5e374e
Created Sep 1, 2014
ORM won't kill any kittens
View gist:90b406b459b76a5e374e
public function indexAction(){
$entityManager = $this->getDoctrine()->getManager();
$articles = $entityManager->getRepository('ORMDemoBundle:Article')->findAll();
return $this->render(
['articles' => $articles]
jmolivas /
Last active Aug 29, 2015
Two Drupal core bugs found using the console project
$ bin/console container:debug
View ContainerAwareCommand.php
namespace Drupal\AppConsole\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Drupal\Core\Extension\ExtensionDiscovery;