This file contains hidden or 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 configure() | |
{ | |
// not really useful, but just in case! | |
parent::configure(); | |
$this->postConfigure(); | |
} | |
public function postConfigure() | |
{ |
This file contains hidden or 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
.required_form_field:after { | |
content:" *"; | |
} |
This file contains hidden or 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 executeCreate(sfWebRequest $request) | |
{ | |
$this->form = new SomeForm(); | |
if($this->processForm($request, $this->form)) | |
{ | |
return $this->renderPartial('list', array( | |
'my_partial' => $this->form->getObject() | |
)); |
This file contains hidden or 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
Student: | |
columns: | |
name: string(255) | |
Test: | |
columns: | |
month: string(10) | |
mark: integer | |
student_id: integer | |
relations: |
This file contains hidden or 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
Student: | |
john: | |
name: John | |
michael: | |
name: Michael | |
jane: | |
name: Jane | |
linda: | |
name: Linda |
This file contains hidden or 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 executeIndex(sfWebRequest $request) | |
{ | |
$this->students = StudentTable::getInstance()->findAll(); | |
} |
This file contains hidden or 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
excel: | |
url: /a.:sf_format | |
param: { module: excel, action: index } |
This file contains hidden or 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
request: | |
param: | |
formats: | |
xls: application/vnd.ms-excel | |
pdf: application/pdf | |
ods: application/vnd.oasis.opendocument.spreadsheet |
This file contains hidden or 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 | |
require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php'; | |
sfCoreAutoload::register(); | |
class ProjectConfiguration extends sfProjectConfiguration | |
{ | |
public function setup() | |
{ | |
$this->enablePlugins('sfDoctrinePlugin'); |
This file contains hidden or 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 MyExcel { | |
private static $format = ''; | |
private static $acceptedFormats = array('ods', 'xls', 'pdf'); | |
public static function setFormat(sfEvent $event) { | |
self::$format = $event['format']; | |
} |