Skip to content

Instantly share code, notes, and snippets.

var $keywordsInput = $('.image-keywords');
$keywordsInput.tagsinput({
confirmKeys: [13, 59, 188] // 13 - Enter 59 - ; 188 - ,
});
// create a bloodhound suggestion engine
var imageKeywords = new Bloodhound({
datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'),
queryTokenizer: Bloodhound.tokenizers.whitespace,
@pdrosos
pdrosos / Settings.yaml
Last active August 29, 2015 13:56
Integration of Gedmo Timestampable and Gedmo Translatable in Flow 2.1
TYPO3:
Flow:
object:
excludeClasses:
'gedmo.*' : ['.*']
persistence:
doctrine:
eventSubscribers:
- '\Gedmo\Timestampable\TimestampableListener'
@pdrosos
pdrosos / GalleryTranslation.php
Created February 11, 2014 08:16
Translation Doctrine Entity in Typo3 Flow 2.1
<?php
namespace My\Gallery\Domain\Model\Translation;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Translatable\Entity\MappedSuperclass\AbstractTranslation;
/**
* @ORM\Table(name="my_gallery_domain_model_gallery_translation", indexes={
* @ORM\Index(name="gallery_translation_idx", columns={"locale", "object_class", "field", "foreign_key"})
* })
@pdrosos
pdrosos / Gallery.php
Created February 11, 2014 08:13
Translatable Doctrine Entity in Typo3 Flow 2.1
@pdrosos
pdrosos / Policy.yaml
Created February 5, 2014 06:51
My.FrontendUser package policy settings
resources:
methods:
'My_FrontendUser_Module_Administration': 'method(My\FrontendUser\Controller\Module\AdministrationController->.*Action())'
'My_FrontendUser_Module_Administration_FrontendUser': 'method(My\FrontendUser\Controller\Module\Administration\FrontendUser\FrontendUserController->.*Action())'
'My_FrontendUser_Module_Administration_Type': 'method(My\FrontendUser\Controller\Module\Administration\Type\TypeController->.*Action())'
'My_FrontendUser_Module_Administration_Company': 'method(My\FrontendUser\Controller\Module\Administration\Company\CompanyController->.*Action())'
'My_FrontendUser_Module_Administration_Country': 'method(My\FrontendUser\Controller\Module\Administration\Country\CountryController->.*Action())'
'My_FrontendUser_Login': 'method(My\FrontendUser\Controller\LoginController->(index|authenticate)Action())'
'My_FrontendUser_Logout': 'method(My\FrontendUser\Controller\LoginController->logoutAction())'
'My_FrontendUser_ForgottenPassword': 'method(My\Fronten
@pdrosos
pdrosos / Settings.yaml
Last active August 29, 2015 13:56
My.FrontendUser package security settings
TYPO3:
Flow:
security:
authentication:
authenticationStrategy: 'oneToken'
providers:
DefaultProvider:
provider: PersistedUsernamePasswordProvider
entryPoint: 'WebRedirect'
@pdrosos
pdrosos / Task.php
Last active December 24, 2015 07:39
One-To-Many, Self-referencing association with Typo3 Flow and Doctrine 2
<?php
namespace My\Package\Domain\Model;
use TYPO3\Flow\Annotations as Flow;
use Doctrine\ORM\Mapping as ORM;
/**
* @Flow\Entity
*/
class Task {
@pdrosos
pdrosos / ObjectAccessViewHelper.php
Last active December 18, 2015 11:29
Typo3 FLOW Fluid template view helper: Array or object access by dynamic key/property/method.
<?php
namespace My\Package\ViewHelpers;
use TYPO3\Flow\Annotations as Flow;
/**
* Allows accessing an array's value by its key or object's property or method by its name
* in order to achieve a "dynamic" path in Fluid, kind of
* {fooarray.{dynamic}}, which is not possible yet, can be replaced
* with {my:objectAccess(haystack: fooarray, needle: key)}