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 | |
/* | |
* $Id: UnitOfWork.php 7684 2010-08-24 16:34:16Z jwage $ | |
* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
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 | |
/** | |
* FileRelation | |
* | |
* | |
* @package shop | |
* @subpackage model | |
* @author Christian Schaefer <[email protected]> | |
* @author Ludovic Fleury <[email protected]> |
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 | |
# Partial called by other admin-gen module like : | |
# include_partial('file_relation/ajax_list',array('object_type'=> 'product', 'object_id' => $product->getId(), 'file_type'=>'image')) | |
?> | |
<fieldset id="sf_fieldset_file_relation_<?php echo $file_type ?>"> | |
<h2><?php echo ucfirst($file_type) ?></h2> | |
<div id="file_relation_<?php echo $file_type ?>" class="file_relation"></div> | |
</fieldset> |
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
Category: | |
collection_0: | |
name: Collection | |
root_id: 1 | |
children: | |
collection_1: | |
name: Spring 2010 | |
summary: | |
collection_2: | |
name: Summer 2010 |
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
app/routing.yml | |
In this example, my Model is identified by A string + an id. | |
That's why I specified requirements. | |
attached_file: | |
class: sfDoctrineRouteCollection | |
options: | |
model: AttachedFile | |
module: attachment | |
prefix_path: /attachment |
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
// Ouvre le premier lien enfant de l'élément cible | |
// Reproduit le comportement des navigateurs (ctrl ou cmd ou middleclick = nouvel onglet) | |
$('.line-click').live('click', function(e){ | |
e.stopPropagation(); | |
href = $(this).children('a:first').attr('href'); | |
if (e.ctrlKey || e.metaKey || e.which == 2) { | |
window.open(href); | |
} else { | |
window.location = href; | |
} |
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 sdzDoctrineGenerateMigrationsDiffTask extends sfDoctrineBaseTask | |
{ | |
/** | |
* @see sfTask | |
*/ | |
protected function configure() | |
{ | |
$this->addOptions(array( |
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
## Default rules =============================================================== | |
homepage: | |
url: / | |
param: | |
module: home | |
action: index | |
sf_format: html | |
<?php foreach(glob(dirname(__FILE__).DIRECTORY_SEPARATOR.'routing'.DIRECTORY_SEPARATOR.'*.yml') as $yml){ require($yml); echo "\n"; } ?> |
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
When I add this gem into my app Gemfile : gem 'mongoid', '~> 2.3.2. | |
I'm unable to run any "rails g" command, it cause this stack trace : | |
/MY_PATH/vendor/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/active_support/whiny_nil.rb:48:in `method_missing': undefined method `values' for nil:NilClass (NoMethodError) | |
from /server/poker/vendor/bundle/ruby/1.9.1/gems/mongoid-2.3.2/lib/mongoid/railtie.rb:64:in `block in <class:Railtie>' | |
from /server/poker/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `instance_exec' | |
from /server/poker/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:30:in `run' | |
from /server/poker/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:55:in `block in run_initializers' | |
from /server/poker/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `each' | |
from /server/poker/vendor/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/rails/initializable.rb:54:in `run_initializers' |
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
// Exercice Tableaux | |
// | |
// Ajouter une variable de type Tableau (tabInventaire) qui contient ces valeurs dans l'ordre que vous voulez : | |
"epee"; | |
"dague"; | |
"fronde"; | |
"arc"; | |
"bombe"; | |
"fleche"; | |
"potion"; |
OlderNewer