Skip to content

Instantly share code, notes, and snippets.

View pniederlag's full-sized avatar

Peter Niederlag pniederlag

View GitHub Profile
@pniederlag
pniederlag / ActionController.php
Created March 16, 2011 13:10
substitute fluid with another templatin engine
<?php
class Tx_Pnphptal_MVC_Controller_ActionController extends Tx_Extbase_MVC_Controller_ActionController {
/**
* Prepares a view for the current action and stores it in $this->view.
* By default, this method tries to locate a view with a name matching
* the current action.
*
* @return void
@pniederlag
pniederlag / SomeController.php
Created February 11, 2011 16:41
Tx_Pnutility_View_VariantView
<?php
class Tx_Polarmedia_Controller_MediaController extends Tx_Extbase_MVC_Controller_ActionController {
/**
* @var defaultViewObjectName use custom extended Tx_Fluid_View_TemplateView
*/
protected $defaultViewObjectName = 'Tx_Pnutility_View_VariantView';
public function teaserAction() {
$variant = $this->settings['variant']); // or anything else(userState...)
@pniederlag
pniederlag / tt_content and Extbase Domain Model
Created February 5, 2011 14:57
mappings and subclasses for extbase
config.tx_extbase {
persistence{
classes {
Tx_Foo_Domain_Model_ContentElement {
# define the subclasses
subclasses {
Tx_Foo_Domain_Model_Ce1 = Tx_Foo_Domain_Model_Ce1
Tx_Foo_Domain_Model_Ce2 = Tx_Foo_Domain_Model_Ce2
}
mapping {