Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Merge details:

(00475c4) Fix classname in services.yml.
by Jelle Sebreghts on Mon Jun 25 09:49:02 2018

(abc544e) WEBDOM-390: Fix extension name.
by Jelle Sebreghts on Fri Jun 22 16:35:10 2018

(c332fea) WEBDOM-390: Added cache clearer for Laravel.
by Jelle Sebreghts on Fri Jun 22 15:59:39 2018

(3ab5090) table rename
by Pieter MAssoels on Fri Apr 27 15:24:14 2018

(c9c78fe) AbstractApplication implementation update
by Pieter MAssoels on Wed Apr 18 11:56:13 2018

(198f725) WEBDOM-343: sort on application type
by Pieter MAssoels on Wed Apr 18 10:45:22 2018

(73a4b15) WEBDOM-281 : webform implementation added
by Pieter MAssoels on Mon Feb 12 09:51:40 2018

(1ebaf36) Corebundle update
by Pieter MAssoels on Mon Jan 22 16:12:01 2018

(c53c5cc) Codestyle fixes
by Pieter MAssoels on Wed Jan 3 13:47:03 2018
  • Loading branch information
Jelle-S committed Aug 2, 2018
2 parents 8e3ec77 + d0c7a69 commit 0b321ae
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 18 deletions.
24 changes: 24 additions & 0 deletions CacheClearer/LaravelCacheClearer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

namespace DigipolisGent\Domainator9k\AppTypes\LaravelBundle\CacheClearer;

use DigipolisGent\CommandBuilder\CommandBuilder;
use DigipolisGent\Domainator9k\CoreBundle\CacheClearer\CacheClearerInterface;
use DigipolisGent\Domainator9k\CoreBundle\CLI\CliInterface;

class LaravelCacheClearer implements CacheClearerInterface
{

/**
* {@inheritdoc}
*/
public function clearCache($object, CliInterface $cli)
{
return $cli->execute(
CommandBuilder::create('php')
->addArgument('artisan')
->addArgument('cache:clear')
->addOption('env', 'prod')
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace DigipolisGent\Domainator9k\AppTypes\LaravelBundle\DependencyInjection;

use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

/**
* This is the class that loads and manages your bundle configuration.
*
* @see http://symfony.com/doc/current/cookbook/bundles/extension.html
* @codeCoverageIgnore
*/
class DigipolisGentDomainator9kAppTypesLaravelExtension extends Extension
{

/**
* {@inheritdoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$loader->load('services.yml');
}
}
18 changes: 15 additions & 3 deletions Entity/LaravelApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,34 @@

namespace DigipolisGent\Domainator9k\AppTypes\LaravelBundle\Entity;

use DigipolisGent\Domainator9k\AppTypes\LaravelBundle\Form\Type\LaravelApplicationFormType;
use DigipolisGent\Domainator9k\CoreBundle\Entity\AbstractApplication;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

/**
* Class LaravelApplication
* @package DigipolisGent\Domainator9k\AppTypes\LaravelBundle\Entity
*
* @ORM\Entity()
* @ORM\Table(name="laravel_application")
*/
class LaravelApplication extends AbstractApplication
{
const TYPE = "LARAVEL";

public function getType()
/**
* @return string
*/
public static function getApplicationType(): string
{
return self::TYPE;
}
}

/**
* @return string
*/
public static function getFormType(): string
{
return LaravelApplicationFormType::class;
}
}
25 changes: 25 additions & 0 deletions Form/Type/LaravelApplicationFormType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php


namespace DigipolisGent\Domainator9k\AppTypes\LaravelBundle\Form\Type;

use DigipolisGent\Domainator9k\AppTypes\LaravelBundle\Entity\LaravelApplication;
use DigipolisGent\Domainator9k\CoreBundle\Form\Type\AbstractApplicationFormType;
use Symfony\Component\OptionsResolver\OptionsResolver;

/**
* Class LaravelApplicationFormType
* @package DigipolisGent\Domainator9k\AppTypes\LaravelBundle\Form\Type
*/
class LaravelApplicationFormType extends AbstractApplicationFormType
{

/**
* @param OptionsResolver $resolver
*/
public function configureOptions(OptionsResolver $resolver)
{
parent::configureOptions($resolver);
$resolver->setDefault('data_class', LaravelApplication::class);
}
}
6 changes: 6 additions & 0 deletions Resources/config/services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
services:
_defaults:
autowire: true
DigipolisGent\Domainator9k\AppTypes\LaravelBundle\CacheClearer\LaravelCacheClearer:
tags:
- {name: domainator.cacheclearer, for: DigipolisGent\Domainator9k\AppTypes\LaravelBundle\Entity\LaravelApplication}
32 changes: 17 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"name": "digipolisgent/domainator9k-apptype-laravel-bundle",
"type": "symfony-bundle",
"description": "",
"license": "MIT",
"authors": [],
"support": {},
"minimum-stability": "dev",
"require": {
"php": ">=7.1"
},
"require-dev": {
"symfony/symfony": ">=3.4"
},
"autoload": {
"psr-4": { "DigipolisGent\\Domainator9k\\AppTypes\\LaravelBundle\\": "" }
"name": "digipolisgent/domainator9k-apptype-laravel-bundle",
"type": "symfony-bundle",
"description": "",
"license": "MIT",
"authors": [],
"support": {},
"minimum-stability": "dev",
"require": {
"php": ">=7.1"
},
"require-dev": {
"symfony/symfony": ">=3.4"
},
"autoload": {
"psr-4": {
"DigipolisGent\\Domainator9k\\AppTypes\\LaravelBundle\\": ""
}
}
}

0 comments on commit 0b321ae

Please sign in to comment.