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
jeroendesloovere / sitemap_generator.php
Last active Jul 13, 2018
Sitemap generator: new version
View sitemap_generator.php
* NOTE: the code below was a brainstorm session.
* You should check out for the latest code
View translation_helper.php
$document = new DOMDocument();
$existingTranslations = [];
function getUserInput() {
return readline("\nTranslation PT: ");

Fork CMS core rules


  • 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 /
Last active Feb 6, 2018
Fork CMS structure
- src
  - Console
    - Core
    - Locale
    - Thumbnails
  - Component
    - Asset
      - Asset.php
      - AssetCollection.php



  • Creating */

// Creating the media group

jeroendesloovere /
Last active Mar 10, 2017
MediaLibrary + external Amazon, Dropbox, ...

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.


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


This tool checks for PSR code styling. More info



We download it to /usr/local/bin/

View DataGridDoctrine.php
// Filename: src/Backend/Core/Engine/DataGridDoctrine.php
namespace Backend\Core\Engine;
* This file is part of Fork CMS.
* For the full copyright and license information, please view the license
* file that was distributed with this source code.
View BackendHelper.php
// Backend MediaGroups Helper
$this->media = $this->get('media_library.helper.backend')->create(
// create new with specified MediaGroup type
You can’t perform that action at this time.