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 | |
/** | |
* This file is an example gist to show the interaction between an ArticleContext and a LikeContext | |
* | |
* @example: | |
* | |
* We have to bounded contexts: ArticleContext and LikeContext and show the simplified process of following use case: | |
* | |
* In order to create a valid article Like, I should validate the article ID given to the LikeContext. | |
* |
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 | |
//To be added under Twig/Node/Switch.php | |
/* | |
* This file is part of Twig. | |
* | |
* (c) 2009 Fabien Potencier | |
* (c) 2009 Armin Ronacher | |
* |
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 My\Doctrine\ORM\Query\Functions; | |
use Doctrine\ORM\Query\AST\Functions\FunctionNode; | |
use Doctrine\ORM\Query\Lexer; | |
use Doctrine\ORM\Query\Parser; | |
use Doctrine\ORM\Query\QueryException; | |
use Doctrine\ORM\Query\SqlWalker; |
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
sf2-ddd | |
├── app | |
├── bin | |
├── build | |
├── lib | |
├── src | |
│ └── __VendorPrefix | |
│ ├── Application | |
│ │ └── __DomainNameBundle | |
│ │ ├── Command |
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
// An example controller binded to the form | |
function FormCntl($scope, $compile) { | |
// Consider using FosJsRouting bundle, if you want to use a Symfony2 route | |
$scope.formUrl = "http://url-to-fetch-my-form"; | |
// Data from the form will be binded here | |
$scope.data = {}; | |
// Method called when submitting the form | |
$scope.submit = function() { |
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 | |
// Itterate over the collection and grap the elements | |
foreach($form->get('collectionName')->getIterator() as $fieldset) | |
{ | |
echo $this->formRow($fieldset->get('elementName')); | |
echo $this->formRow($fieldset->get('elementAnotherElementName')); |
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 Zend\Console\Console; | |
$config = array( | |
'modules' => array( | |
'Application', | |
'DoctrineModule', | |
'DoctrineORMModule', | |
// ... |
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 | |
// ... | |
class ProductAdmin extends SonataAdmin | |
{ | |
// ... | |
protected function configureDatagridFilters(DatagridMapper $filter) | |
{ |
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 test = $('#test'); | |
$(test).select2({ | |
data:[ | |
{id:0,text:"enhancement"}, | |
{id:1,text:"bug"}, | |
{id:2,text:"duplicate"}, | |
{id:3,text:"invalid"}, | |
{id:4,text:"wontfix"} | |
], | |
width: "300px" |
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 I18nGenerator < Rails::Generators::NamedBase | |
def create_files | |
I18n.available_locales.each do |locale| | |
create_locale_file( locale ) | |
end | |
end | |
private | |
def namespaces |