Skip to content

Instantly share code, notes, and snippets.

Jeroen Desloovere jeroendesloovere

Block or report user

Report or block jeroendesloovere

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View install-redis.md

Redis Installation

1. Download and install Redis

Copy/paste the following code block into your terminal.

# Downloading latest
wget http://download.redis.io/redis-stable.tar.gz
View doctrine-translatable-readme.md

Doctrine Translatable

With Translatable you can translate the fields you like in your Doctrine Entity. Check out other Doctrine Extensions

  • Official Doctrine Extensions installation guide here.
  • Official Doctrine Translatable documentation over here.

Installation

composer.json

@jeroendesloovere
jeroendesloovere / sitemap_generator.php
Last active Jul 13, 2018
Sitemap generator: new version
View sitemap_generator.php
<?php
/**
* NOTE: the code below was a brainstorm session.
* You should check out https://github.com/jeroendesloovere/sitemap-bundle for the latest code
*/
/**
* CORE
*/
View translation_helper.php
<?php
$document = new DOMDocument();
$document->load($argv[1]);
$existingTranslations = [];
function getUserInput() {
return readline("\nTranslation PT: ");
}
View fork_cms_core_rules.md

Fork CMS core rules

PHP

  • Vendor namespace ForkCMS
  • We follow the PSR-2 coding style guide
  • Class names in PascalCase, f.e.: class Url{}, class FirstName{} - All abbreviations need to be PascalCased
  • Method names in camelCase, f.e.: function getUrl(){}, function getFirstName(){}- All abbreviations need to be camelCased

Symfony service-ids

@jeroendesloovere
jeroendesloovere / structure.md
Last active Feb 6, 2018
Fork CMS structure
View structure.md
- src
  - Console
    - Core
    - Locale
    - Thumbnails
  - Component
    - Asset
      - Asset.php
      - AssetCollection.php
View SYLIUS-MAC-MAMP-PRO-INSTALLATION-README.md

Sylius

Usage

Installation

composer create-project -s dev sylius/sylius-standard sylius

Which installs the sylius standard in a new folder, named sylius

View MediaLibraryImporter.md

MediaLibraryImporter

/**

  • Creating */

// Creating the media group

@jeroendesloovere
jeroendesloovere / README.md
Last active Mar 10, 2017
MediaLibrary + external Amazon, Dropbox, ...
View README.md

Fork CMS MediaLibrary module + external storage type (Amazon, Dropbox, ...)

The idea

Backend thumbnails

What happens in the MediaLibrary module

When somebody uploads a source to the website. => A MediaItemCreated event is triggered.

View doctrine-reverse-engineering.md

Doctrine Reverse Engineering

Doctrine Source

How to create Entity files from database tables?

1. Creating .orm.yml files in /Resources/config/...

php app/console doctrine:mapping:import --force AcmeBlogBundle yml --env=prod
You can’t perform that action at this time.