Skip to content

Commit

Permalink
refactor configuration files and update php docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ychadwick committed Oct 31, 2013
1 parent 4a93919 commit d40ee84
Show file tree
Hide file tree
Showing 198 changed files with 2,072 additions and 1,753 deletions.
32 changes: 15 additions & 17 deletions Admin/BaseAdmin.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

/**
* This file is part of the Networking package.
*
Expand All @@ -11,19 +10,19 @@

namespace Networking\InitCmsBundle\Admin;

use Sonata\AdminBundle\Admin\Admin,
Sonata\AdminBundle\Datagrid\ListMapper,
Sonata\AdminBundle\Form\FormMapper,
Sonata\AdminBundle\Show\ShowMapper,
Sonata\AdminBundle\Datagrid\DatagridMapper,
Symfony\Component\DependencyInjection\ContainerInterface,
Ibrows\Bundle\SonataAdminAnnotationBundle\Reader\SonataAdminAnnotationReaderInterface;
use Sonata\AdminBundle\Admin\Admin;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Show\ShowMapper;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Ibrows\Bundle\SonataAdminAnnotationBundle\Reader\SonataAdminAnnotationReaderInterface;
use Symfony\Component\Intl\Intl;
use Symfony\Component\Locale\Locale;


/**
* @author net working AG <[email protected]>
* Class BaseAdmin
* @package Networking\InitCmsBundle\Admin
* @author Yorkie Chadwick <[email protected]>
*/
abstract class BaseAdmin extends Admin
{
Expand Down Expand Up @@ -65,7 +64,7 @@ protected function getLocaleChoices()
$locale = $this->getRequest()->get('locale');
}

if(is_array($locale) && array_key_exists('value', $locale)){
if (is_array($locale) && array_key_exists('value', $locale)) {
$locale = $locale['value'];
}

Expand Down Expand Up @@ -141,38 +140,37 @@ public function getTrackedActions()
}

/**
* @param ListMapper $listMapper
* {@inheritdoc}
*/
protected function configureListFields(ListMapper $listMapper)
{
$this->getSonataAnnotationReader()->configureListFields($this->getClass(), $listMapper);
}

/**
* @param FormMapper $formMapper
* {@inheritdoc}
*/
protected function configureFormFields(FormMapper $formMapper)
{
$this->getSonataAnnotationReader()->configureFormFields($this->getClass(), $formMapper);
}

/**
* @param ShowMapper $showMapper
* {@inheritdoc}
*/
protected function configureShowFields(ShowMapper $showMapper)
{
$this->getSonataAnnotationReader()->configureShowFields($this->getClass(), $showMapper);
}

/**
* @param DatagridMapper $datagridMapper
* {@inheritdoc}
*/
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
$this->getSonataAnnotationReader()->configureDatagridFilters($this->getClass(), $datagridMapper);
}


/**
* @return ContainerInterface
*/
Expand Down
24 changes: 24 additions & 0 deletions Admin/Document/GalleryAdmin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
/**
* This file is part of the init_cms_sandbox package.
*
* (c) net working AG <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/


namespace Networking\InitCmsBundle\Admin\Document;

use Networking\InitCmsBundle\Admin\Model\GalleryAdmin as ModelGallery;

/**
* Class GalleryAdmin
* @package Networking\InitCmsBundle\Admin\Document
* @author Yorkie Chadwick <[email protected]>
*/
class GalleryAdmin extends ModelGallery{

}

3 changes: 3 additions & 0 deletions Admin/Document/GroupAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
namespace Networking\InitCmsBundle\Admin\Document;

use Networking\InitCmsBundle\Admin\Model\GroupAdmin as ModelGroupAdmin;

/**
* Class GroupAdmin
* @package Networking\InitCmsBundle\Admin\Document
* @author Yorkie Chadwick <[email protected]>
*/
class GroupAdmin extends ModelGroupAdmin {
Expand Down
20 changes: 20 additions & 0 deletions Admin/Document/LayoutBlockAdmin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/**
* Created by PhpStorm.
* User: marcbissegger
* Date: 10/24/13
* Time: 11:40 AM
*/

namespace Networking\InitCmsBundle\Admin\Document;

use Networking\InitCmsBundle\Admin\Model\LayoutBlockAdmin as ModelLayoutBlockAdmin;

/**
* Class LayoutBlockAdmin
* @package Networking\InitCmsBundle\Admin\Entity
* @author Yorkie Chadwick <[email protected]>
*/
class LayoutBlockAdmin extends ModelLayoutBlockAdmin{

}
3 changes: 3 additions & 0 deletions Admin/Document/MediaAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
namespace Networking\InitCmsBundle\Admin\Document;

use Networking\InitCmsBundle\Admin\Model\MediaAdmin as ModelMediaAdmin;

/**
* Class MediaAdmin
* @package Networking\InitCmsBundle\Admin\Document
* @author Yorkie Chadwick <[email protected]>
*/
class MediaAdmin extends ModelMediaAdmin {
Expand Down
21 changes: 11 additions & 10 deletions Admin/Document/MenuItemAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,21 @@

namespace Networking\InitCmsBundle\Admin\Document;

use Networking\InitCmsBundle\Admin\BaseAdmin,
Networking\InitCmsBundle\Entity\MenuItem,
Sonata\AdminBundle\Admin\Admin,
Sonata\AdminBundle\Datagrid\ListMapper,
Sonata\AdminBundle\Datagrid\DatagridMapper,
Sonata\AdminBundle\Validator\ErrorElement,
Sonata\AdminBundle\Form\FormMapper,
Sonata\AdminBundle\Route\RouteCollection,
Doctrine\ORM\EntityRepository,
Networking\InitCmsBundle\Form\DataTransformer\MenuItemToNumberTransformer;
use Networking\InitCmsBundle\Admin\BaseAdmin;
use Networking\InitCmsBundle\Entity\MenuItem;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Validator\ErrorElement;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Route\RouteCollection;
use Doctrine\ORM\EntityRepository;
use Networking\InitCmsBundle\Form\DataTransformer\MenuItemToNumberTransformer;
use Sonata\AdminBundle\Exception\ModelManagerException;
use Sonata\DoctrineMongoDBAdminBundle\Datagrid\ProxyQuery;

/**
* Class MenuItemAdmin
* @package Networking\InitCmsBundle\Admin\Document
* @author Yorkie Chadwick <[email protected]>
*/
class MenuItemAdmin extends BaseAdmin
Expand Down
3 changes: 2 additions & 1 deletion Admin/Document/PageAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
namespace Networking\InitCmsBundle\Admin\Document;

use Networking\InitCmsBundle\Admin\Model\PageAdmin as ModelPageAdmin;
use Networking\InitCmsBundle\Model\LayoutBlockInterface;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Networking\InitCmsBundle\Model\PageInterface;
use Sonata\DoctrineMongoDBAdminBundle\Datagrid\ProxyQuery;

/**
* Class PageAdmin
* @package Networking\InitCmsBundle\Admin\Document
* @author Yorkie Chadwick <[email protected]>
*/
class PageAdmin extends ModelPageAdmin
Expand Down
23 changes: 23 additions & 0 deletions Admin/Document/TagAdmin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
/**
* This file is part of the Networking package.
*
* (c) net working AG <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Networking\InitCmsBundle\Admin\Document;

use Networking\InitCmsBundle\Admin\Model\TagAdmin as ModelTagAdmin;

/**
* Class TagAdmin
* @package Networking\InitCmsBundle\Admin\Document
* @author Yorkie Chadwick <[email protected]>
*/
class TagAdmin extends ModelTagAdmin
{

}
6 changes: 5 additions & 1 deletion Admin/Document/TranslationAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@
use Sonata\AdminBundle\Datagrid\ListMapper;

/**
* Class MongoDBTranslationAdmin
* @package Networking\InitCmsBundle\Admin\Document
* @author Yorkie Chadwick <[email protected]>
*/
class MongoDBTranslationAdmin extends BaseTranslationAdmin
{

/**
* {@inheritdoc}
*/
protected function configureDatagridFilters(DatagridMapper $filter)
{
$filter
Expand Down
2 changes: 2 additions & 0 deletions Admin/Document/UserAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
use Networking\InitCmsBundle\Admin\Model\UserAdmin as ModelUserAdmin;

/**
* Class UserAdmin
* @package Networking\InitCmsBundle\Admin\Document
* @author Yorkie Chadwick <[email protected]>
*/
class UserAdmin extends ModelUserAdmin
Expand Down
23 changes: 23 additions & 0 deletions Admin/Entity/GalleryAdmin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php
/**
* This file is part of the init_cms_sandbox package.
*
* (c) net working AG <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Networking\InitCmsBundle\Admin\Entity;

use Networking\InitCmsBundle\Admin\Model\GalleryAdmin as ModelGalleryAdmin;

/**
* Class GalleryAdmin
* @package Networking\InitCmsBundle\Admin\Entity
* @author Yorkie Chadwick <[email protected]>
*/
class GalleryAdmin extends ModelGalleryAdmin{

}

7 changes: 5 additions & 2 deletions Admin/Entity/GroupAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/


namespace Networking\InitCmsBundle\Admin\Entity;

use Networking\InitCmsBundle\Admin\Model\GroupAdmin as ModelGroupAdmin;

/**
* Class GroupAdmin
* @package Networking\InitCmsBundle\Admin\Entity
* @author Yorkie Chadwick <[email protected]>
*/
class GroupAdmin extends ModelGroupAdmin {
class GroupAdmin extends ModelGroupAdmin
{

}

5 changes: 5 additions & 0 deletions Admin/Entity/HelpTextAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@

use Networking\InitCmsBundle\Admin\Model\HelpTextAdmin as ModelHelpTextAdmin;

/**
* Class HelpTextAdmin
* @package Networking\InitCmsBundle\Admin\Entity
* @author Yorkie Chadwick <[email protected]>
*/
class HelpTextAdmin extends ModelHelpTextAdmin{

}
15 changes: 11 additions & 4 deletions Admin/Entity/LayoutBlockAdmin.php
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
<?php
/**
* Created by PhpStorm.
* User: marcbissegger
* Date: 10/24/13
* Time: 11:40 AM
* This file is part of the Networking package.
*
* (c) net working AG <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Networking\InitCmsBundle\Admin\Entity;

use Networking\InitCmsBundle\Admin\Model\LayoutBlockAdmin as ModelLayoutBlockAdmin;

/**
* Class LayoutBlockAdmin
* @package Networking\InitCmsBundle\Admin\Entity
* @author Yorkie Chadwick <[email protected]>
*/
class LayoutBlockAdmin extends ModelLayoutBlockAdmin{

}
3 changes: 3 additions & 0 deletions Admin/Entity/MediaAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
namespace Networking\InitCmsBundle\Admin\Entity;

use Networking\InitCmsBundle\Admin\Model\MediaAdmin as ModelMediaAdmin;

/**
* Class MediaAdmin
* @package Networking\InitCmsBundle\Admin\Entity
* @author Yorkie Chadwick <[email protected]>
*/
class MediaAdmin extends ModelMediaAdmin {
Expand Down
16 changes: 11 additions & 5 deletions Admin/Entity/MenuItemAdmin.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
<?php
/**
* Created by PhpStorm.
* User: marcbissegger
* Date: 10/24/13
* Time: 12:13 PM
* This file is part of the init_cms_sandbox package.
*
* (c) net working AG <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Networking\InitCmsBundle\Admin\Entity;


use Networking\InitCmsBundle\Admin\Model\MenuItemAdmin as ModelMenuItemAdmin;

/**
* Class MenuItemAdmin
* @package Networking\InitCmsBundle\Admin\Entity
* @author Yorkie Chadwick <[email protected]>
*/
class MenuItemAdmin extends ModelMenuItemAdmin{

}
Loading

0 comments on commit d40ee84

Please sign in to comment.