Skip to content

Instantly share code, notes, and snippets.

# #
# Example Settings #
# #
# This file contains settings for various parts of the application. #
# Copy this file to Settings.yaml, and adjust as necessary. #
# #
# Please refer to the default settings file(s) or the manuals for #
# possible configuration options. #
# #
@Allisone
Allisone / gist:5187268
Created March 18, 2013 13:51
git diff on flow-base-distribution
diff --git a/composer.json b/composer.json
index 70fa022..30a84f7 100644
--- a/composer.json
+++ b/composer.json
@@ -14,7 +14,12 @@
},
"require": {
"typo3/flow": "2.0.*",
- "typo3/welcome": "2.0.*"
+ "typo3/welcome": "2.0.*",
@Allisone
Allisone / getConfigurationFor.php
Created September 18, 2012 08:48
Example that fails using Change I2fa8802e
<?php
public function getConfigurationFor($propertyName) {
if (isset($this->subConfigurationForProperty[$propertyName])) {
return $this->subConfigurationForProperty[$propertyName];
} elseif (isset($this->subConfigurationForProperty[self::PROPERTY_PATH_PLACEHOLDER])) {
return $this->subConfigurationForProperty[self::PROPERTY_PATH_PLACEHOLDER];
}
return new \TYPO3\FLOW3\Property\PropertyMappingConfiguration();
}
@Allisone
Allisone / ViewHelperHelper.php
Created August 15, 2012 12:24
A service class that enables you to render a ViewHelper from within a ViewHelper
<?php
namespace Wojtowicz\Utilities\Service;
use TYPO3\FLOW3\Annotations as FLOW3;
/**
* Created by Sebastian Wojtowicz.
* Date: 15.08.12 - 13:57
*
* @FLOW3\Scope("singleton")
*/
@Allisone
Allisone / commit
Created May 30, 2012 11:39
Why and where is this a breaking change
[!!!][BUGFIX] Avoid validating instances more often than needed
The GenericObjectValidator uses a static variable to store objects being
validated. Objects were still validated over and over because at the
end of isValid() they were detached again.
This change replaces that detach() call with another concept. Now
any validator implementing the new ObjectValidatorInterface can be
given an SplObjectStorage to keep track of instances already
validated.
<?php
class Genero {
/**
* The peliculas
* @var \Peliculas\Domain\Model\Peliculas
* @ORM\ManyToOne
*/
protected $peliculas;
<script type="text/javascript">
$(document).ready(function(){
$("a").click(function(event){
event.preventDefault();
var request = $.ajax({
url: '<f:format.raw><f:uri.widget ajax="TRUE" action="list" /></f:format.raw>',
type: "GET",
dataType: "html"
});
@Allisone
Allisone / not_a_file.php
Created March 15, 2012 09:43
What works and what doesn't
/**
* save the registration
* @param string $email email
* @param string $pw password
* @param string $uname username
* @FLOW3\Validate(argumentName="email", type="EmailAddress")
* @FLOW3\Validate(argumentName="email", type="NotEmpty")
* @FLOW3\Validate(argumentName="pw", type="Me\My\Validation\Validator\PasswordValidator", options={ "minimum"=1, "maximum"=255 })
*/
public function createAction($email = '', $pw = '', $uname = '') {...}
@Allisone
Allisone / PasswordValidator.php
Created March 15, 2012 09:33
PasswordValidator but with StringLengthValidator code
<?php
namespace Me\My\Validation\Validator;
use TYPO3\FLOW3\Annotations as FLOW3;
/**
* Validator for password
*
* @api
* @FLOW3\Scope("singleton")
@Allisone
Allisone / Index.html
Created March 14, 2012 10:44
Create Account
<f:flashMessages />
<f:form action="create" controller="Login" method="post" name="createform">
<div><label>Email:</label><f:form.textfield name="email" /></div>
<div><label>Password:</label><f:form.textfield name="pw" /></div>
<div><label>Repeat Password:</label><f:form.textfield name="pwr" /></div>
<div><label>Username:</label><f:form.textfield name="uname" /></div>
<f:form.submit value="Register and Login" />
</f:form>