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/config/deploy.rb | |
# | |
# Multistage deploy config. | |
# require capistrano-ext | |
# see: http://www.zalas.eu/multistage-deployment-of-symfony-applications-with-capifony | |
# | |
set :stage_dir, 'app/config/deploy' | |
require 'capistrano/ext/multistage' |
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
HTML: | |
<div class="header with-cool-bottom-background-image"></div> | |
<div class="container"> | |
<div class="panels"> | |
<div class="panel1" style="display: none"> | |
<h1>Cool Default Content (homepage)</h1> | |
</div> | |
<div class="panel2" style="display: none"> | |
<h1>This nice content is hidden by default and will be displayed only on link click below.</h1> | |
</div> |
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 | |
$input = "#A2D73A"; | |
if(!preg_match('/#([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})/', $input, $matches)){ | |
die(sprintf("Error: '%s' is not a valid hexadecimal color!", $input)); | |
} | |
$bgColor1 = $input; | |
$bgColor2 = blackify($input, 60); |
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 ProjectConfiguration extends sfProjectConfiguration | |
{ | |
public function setup() | |
{ | |
$this->enableAllPluginsExcept('sfDoctrinePlugin'); | |
// if(ENV == "dev"): | |
$this->setWebDir('/a/path'); | |
// else: | |
$this->setWebDir('a/different/path'); |
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 MyClass | |
{ | |
static $choicesMaxChildren = array( | |
1 => '1', | |
2 => '2', | |
3 => '3', | |
4 => '4', | |
5 => '5', | |
6 => 'Whaaa! more than 5 ?', | |
); |
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
# routing.yml | |
language: | |
class: sfPropelRouteCollection | |
options: | |
model: Language | |
module: language | |
prefix_path: language | |
column: id | |
with_wildcard_routes: true | |
requirememts: '\w+' |
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
# routing.yml | |
language: | |
class: sfPropelRouteCollection | |
options: | |
model: Language | |
module: language | |
prefix_path: language | |
column: id | |
with_wildcard_routes: true | |
requirememts: |
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 Route "language_edit" for application "backend" | |
Name language_edit | |
Pattern /language/:id/edit.:sf_format | |
Class sfPropelRoute | |
Defaults action: 'edit' | |
module: 'language' | |
sf_format: 'html' | |
Requirements id: '\\d+' | |
sf_format: '[^/\\.]+' | |
sf_method: 'get' |
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
language GET /language.:sf_format | |
language_new GET /language/new.:sf_format | |
language_create POST /language.:sf_format | |
language_edit GET /language/:id/edit.:sf_format | |
language_update PUT /language/:id.:sf_format | |
language_delete DELETE /language/:id.:sf_format | |
language_show GET /language/:id.:sf_format | |
language_object GET /language/:id/:action.:sf_format | |
language_collection POST /language/:action/action.:sf_format |
NewerOlder