Skip to content

Instantly share code, notes, and snippets.

View a-r-m-i-n's full-sized avatar

Armin Vieweg a-r-m-i-n

View GitHub Profile
@a-r-m-i-n
a-r-m-i-n / BackendLayoutFileProvider.php
Created November 5, 2014 15:55
Example of how to provide a BackendLayoutFileProvider in TYPO3 6.2
<?php
namespace sunzinet\Typo3szBase\Provider;
/***************************************************************
* Copyright notice
*
* (c) 2014 Armin Rüdiger Vieweg <armin@v.ieweg.de>
*
* All rights reserved
*
@a-r-m-i-n
a-r-m-i-n / page.ts
Created November 5, 2014 15:47
Using Fluid-Templates in TYPO3
page = PAGE
page {
typeNum = 0
10 =< lib.templates.base
}
@a-r-m-i-n
a-r-m-i-n / WhateverCommandController.php
Created October 28, 2014 12:38
Command Controller in Extbase for Scheduler Tasks
<?php
// Classes/Command/WhateverCommandController.php
/**
* Whatever controller
*
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*
*/
@a-r-m-i-n
a-r-m-i-n / array2ts.php
Last active July 22, 2023 17:52
Method to convert array to TypoScript string
<?php
/**
* Converts given array to TypoScript
*
* @param array $typoScriptArray The array to convert to string
* @param string $addKey Prefix given values with given key (eg. lib.whatever = {...})
* @param integer $tab Internal
* @param boolean $init Internal
* @return string TypoScript
@a-r-m-i-n
a-r-m-i-n / Crop.js
Created August 13, 2014 13:48
AngularJS filter to crop text and respect word boundaries
'use strict';
app.filter('crop', function(){
return function(input, limit, respectWordBoundaries, suffix){
if (input === null || input === undefined || limit === null || limit === undefined || limit === '') {
return input;
}
if (angular.isUndefined(respectWordBoundaries)) {
respectWordBoundaries = true;
}
if (angular.isUndefined(suffix)) {
@a-r-m-i-n
a-r-m-i-n / RespectAccessInSelect.php
Last active August 29, 2015 14:05
Add access rights check to TCA select lists in TYPO3
<?php
namespace Company\Extension\UserFunctions;
/***************************************************************
* Copyright notice
*
* (c) 2014 Armin Rüdiger Vieweg <armin@v.ieweg.de>
*
* All rights reserved
*