Skip to content

Instantly share code, notes, and snippets.

View pniederlag's full-sized avatar

Peter Niederlag pniederlag

View GitHub Profile
@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 {
@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 / 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 / BaseController.php
Created June 23, 2011 13:35 — forked from naag/BaseController.php
Multiple argument validation in Extbase
<?php
class Tx_MyExt_Controller_BaseController extends Tx_Extbase_MVC_Controller_ActionController {
/**
* @see Tx_Extbase_MVC_Controller_ActionController::callActionMethod()
*/
protected function callActionMethod() {
$this->validateAll();
parent::callActionMethod();
@pniederlag
pniederlag / gerrit-anon.patch
Created June 24, 2011 06:47
gerrit: enable anon access with HTTP auth
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java
index d0e5192..0b6605f 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/Gerrit.java
@@ -492,6 +492,13 @@ public class Gerrit implements EntryPoint {
switch (cfg.getAuthType()) {
case HTTP:
case HTTP_LDAP:
+ menuRight.addItem(C.menuSignIn(), new Command() {
+ public void execute() {
@pniederlag
pniederlag / FormErrors.html
Created November 9, 2011 09:51
Partial FormErrors
<f:form.errors for="{for}">
<div class="f3-form-error">
<!-- Fehlercode: {error.code} -->
<f:if condition="{error.propertyName}">
<f:then>
<f:for each="{error.errors}" as="errorDetail">
<f:if condition="{errorDetail.errors}">
<f:then>
<f:for each="{errorDetail.errors}" as="propertyError">
@pniederlag
pniederlag / openerp_setup_gist.py
Created June 29, 2012 07:28
automate openerp setup
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on 29.03.2012
@author: pn
'''
import sys
import traceback
import argparse
@pniederlag
pniederlag / 2col-gridelement-typoscript
Last active December 16, 2015 16:49
dynamic width 2-col gridelement
###################################
# gridelements setup for col-2 element
###################################
# copy default grid rendering into grid with id = 2
tt_content.gridelements_pi1.20.10.setup.2 < tt_content.gridelements_pi1.20.10.setup.default
tt_content.gridelements_pi1.20.10.setup.2.columns {
#default.wrap = <div class="span6">|</div>
default.dataWrap.cObject = CASE
default.dataWrap.cObject {
@pniederlag
pniederlag / README.md
Last active August 29, 2015 13:57 — forked from agnoster/README.md
agnoster zsh theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@pniederlag
pniederlag / README
Last active August 29, 2015 14:14
makeInstance adressing issue
Demonstrate the usage of makeInstance and/or php namespaces adressing background