Skip to content

Commit

Permalink
Fixed typo in annotation for SeparatorPage
Browse files Browse the repository at this point in the history
Added dev dependencies
Code reformat
  • Loading branch information
tentwofour committed Feb 16, 2016
1 parent 985c065 commit 8a82381
Show file tree
Hide file tree
Showing 20 changed files with 2,211 additions and 105 deletions.
39 changes: 1 addition & 38 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,41 +1,4 @@
### Symfony template
# Cache and logs (Symfony2)
/app/cache/*
/app/logs/*
!app/cache/.gitkeep
!app/logs/.gitkeep

# Cache and logs (Symfony3)
/var/cache/*
/var/logs/*
!var/cache/.gitkeep
!var/logs/.gitkeep

# Parameters
/app/config/parameters.yml
/app/config/parameters.ini

# Managed by Composer
/app/bootstrap.php.cache
/var/bootstrap.php.cache
/bin/*
!bin/console
!bin/symfony_requirements
/vendor/

# Assets and user uploads
/web/bundles/
/web/uploads/

# PHPUnit
/app/phpunit.xml
/phpunit.xml

# Build data
/build/

# Composer PHAR
/composer.phar
vendor

# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm

Expand Down
9 changes: 9 additions & 0 deletions .idea/composerJson.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions DependencyInjection/Ten24CMSPagesExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Ten24\CMSPagesBundle\DependencyInjection;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
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
Expand All @@ -17,7 +17,8 @@ class Ten24CMSPagesExtension extends Extension
/**
* {@inheritDoc}
*/
public function load(array $configs, ContainerBuilder $container)
public function load(array $configs,
ContainerBuilder $container)
{
$configuration = new Configuration();
$this->processConfiguration($configuration, $configs);
Expand Down
20 changes: 10 additions & 10 deletions Entity/ContentPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,39 +31,39 @@ public function getDefaultAdminType()
*/
public function getPossibleChildTypes()
{
return array(
array(
return [
[
'name' => 'Content Page',
'class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'
),
array(
],
[
'name' => 'Separator',
'class' => 'Ten24\CMSPagesBundle\Entity\SeparatorPage'
),
);
],
];
}

/**
* @return string[]
*/
public function getPagePartAdminConfigurations()
{
return array(
return [
'Ten24CMSPagesBundle:main',
'Ten24CMSPagesBundle:sidebar'
);
];
}

/**
* {@inheritdoc}
*/
public function getPageTemplates()
{
return array(
return [
'Ten24CMSPagesBundle:default-one-column',
'Ten24CMSPagesBundle:default-two-column-left',
'Ten24CMSPagesBundle:default-two-column-right'
);
];
}

/**
Expand Down
21 changes: 10 additions & 11 deletions Entity/HomePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Ten24\CMSPagesBundle\Entity;

use Ten24\CMSPagesBundle\Form\HomePageAdminType;
use Doctrine\ORM\Mapping as ORM;
use Kunstmaan\NodeBundle\Entity\AbstractPage;
use Kunstmaan\PagePartBundle\Helper\HasPageTemplateInterface;
use Ten24\CMSPagesBundle\Form\HomePageAdminType;

/**
* HomePage Superclass
Expand All @@ -14,7 +14,6 @@
*/
abstract class HomePage extends AbstractPage implements HasPageTemplateInterface
{

/**
* Returns the default backend form type for this page
*
Expand All @@ -31,13 +30,13 @@ public function getDefaultAdminType()
*/
public function getPossibleChildTypes()
{
return array(
array(
return [
[
'name' => 'Content Page',
'class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'),
array(
'class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'],
[
'name' => 'Separator',
'class' => 'Ten24\CMSPagesBundle\Entity\SeparatorPage'),);
'class' => 'Ten24\CMSPagesBundle\Entity\SeparatorPage'],];
}

/**
Expand All @@ -46,20 +45,20 @@ public function getPossibleChildTypes()
*/
public function getPagePartAdminConfigurations()
{
return array(
'Ten24CMSPagesBundle:home');
return [
'Ten24CMSPagesBundle:home'];
}

/**
* @return array
*/
public function getPageTemplates()
{
return array(
return [
'Ten24CMSPagesBundle:default-one-column',
'Ten24CMSPagesBundle:default-two-column-left',
'Ten24CMSPagesBundle:default-two-column-right',
'Ten24CMSPagesBundle:homepage');
'Ten24CMSPagesBundle:homepage'];
}

/**
Expand Down
25 changes: 14 additions & 11 deletions Entity/SeparatorPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
namespace Ten24\CMSPagesBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Kunstmaan\NodeBundle\Entity\AbstractPage;
use Kunstmaan\PagePartBundle\Helper\HasPageTemplateInterface;
use Ten24\CMSPagesBundle\Form\SeparatorPageAdminType;

/**
* SeparatorPage Mappedsuperclass
*
* @ORM\Mappedsuperclass
* @ORM\MappedSuperclass
*/
class SeparatorPage extends \Kunstmaan\NodeBundle\Entity\AbstractPage
implements \Kunstmaan\PagePartBundle\Helper\HasPageTemplateInterface
abstract class SeparatorPage extends AbstractPage implements HasPageTemplateInterface
{

/**
Expand All @@ -30,32 +31,34 @@ public function getDefaultAdminType()
*/
public function getPossibleChildTypes()
{
return array(
array(
return [
[
'name' => 'Content Page',
'class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'),
array(
'class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'],
[
'name' => 'Separator',
'class' => 'Ten24\CMSPagesBundle\Entity\SeparatorPage'));
'class' => 'Ten24\CMSPagesBundle\Entity\SeparatorPage']];
}

/**
* Get possible page part admin configurations
*
* @return array
*/
public function getPagePartAdminConfigurations()
{
return array();
return [];
}

/**
* Get possible page templates for this page
*
* @return array
*/
public function getPageTemplates()
{
return array(
'Ten24CMSPagesBundle:separator');
return [
'Ten24CMSPagesBundle:separator'];
}

/**
Expand Down
11 changes: 6 additions & 5 deletions Form/ContentPageAdminType.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ class ContentPageAdminType extends PageAdminType
* @see FormTypeExtensionInterface::buildForm()
*
* @param FormBuilderInterface $builder The form builder
* @param array $options The options
* @param array $options The options
*
* @SuppressWarnings("unused")
*/
public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder,
array $options)
{
parent::buildForm($builder, $options);
}
Expand All @@ -36,9 +37,9 @@ public function buildForm(FormBuilderInterface $builder, array $options)
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'
));
$resolver->setDefaults([
'data_class' => 'Ten24\CMSPagesBundle\Entity\ContentPage'
]);
}

/**
Expand Down
11 changes: 6 additions & 5 deletions Form/HomePageAdminType.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ class HomePageAdminType extends PageAdminType
* @see FormTypeExtensionInterface::buildForm()
*
* @param FormBuilderInterface $builder The form builder
* @param array $options The options
* @param array $options The options
*
* @SuppressWarnings("unused")
*/
public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder,
array $options)
{
parent::buildForm($builder, $options);
}
Expand All @@ -36,9 +37,9 @@ public function buildForm(FormBuilderInterface $builder, array $options)
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'Ten24\CMSPagesBundle\Entity\HomePage'
));
$resolver->setDefaults([
'data_class' => 'Ten24\CMSPagesBundle\Entity\HomePage'
]);
}

/**
Expand Down
14 changes: 8 additions & 6 deletions Form/SeparatorPageAdminType.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Ten24\CMSPagesBundle\Form;

use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

/**
* SeparatorPageAdminType
Expand All @@ -16,12 +16,14 @@ class SeparatorPageAdminType extends \Kunstmaan\NodeBundle\Form\PageAdminType
*
* This method is called for each type in the hierarchy starting form the
* top most type. Type extensions can further modify the form.
*
* @param FormBuilderInterface $builder The form builder
* @param array $options The options
* @param array $options The options
*
* @see FormTypeExtensionInterface::buildForm()
*/
public function buildForm(FormBuilderInterface $builder, array $options)
public function buildForm(FormBuilderInterface $builder,
array $options)
{
parent::buildForm($builder, $options);
}
Expand All @@ -33,9 +35,9 @@ public function buildForm(FormBuilderInterface $builder, array $options)
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => '\Ten24\CMSPagesBundle\Entity\SeparatorPage'
));
$resolver->setDefaults([
'data_class' => '\Ten24\CMSPagesBundle\Entity\SeparatorPage'
]);
}

/**
Expand Down
12 changes: 6 additions & 6 deletions Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ services:
- { name: form.type, alias: ten24cmspages.homepageadmin }

ten24cmspages.form.type.admin.contentpage:
class: %ten24cmspages.form.type.admin.contentpage.class%
tags:
- { name: form.type, alias: ten24cmspages.contentpageadmin }
class: %ten24cmspages.form.type.admin.contentpage.class%
tags:
- { name: form.type, alias: ten24cmspages.contentpageadmin }

ten24cmspages.form.type.admin.separatorpage:
class: %ten24cmspages.form.type.admin.separatorpage.class%
tags:
- { name: form.type, alias: ten24cmspages.separatorpageadmin }
class: %ten24cmspages.form.type.admin.separatorpage.class%
tags:
- { name: form.type, alias: ten24cmspages.separatorpageadmin }
Loading

0 comments on commit 8a82381

Please sign in to comment.