This repository has been archived by the owner on Jun 25, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe35efd
commit f696151
Showing
47 changed files
with
756 additions
and
478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
|
||
namespace AppBundle\Admin; | ||
|
||
use Sonata\AdminBundle\Admin\AbstractAdmin, | ||
Sonata\AdminBundle\Datagrid\ListMapper, | ||
Sonata\AdminBundle\Datagrid\DatagridMapper, | ||
Sonata\AdminBundle\Form\FormMapper; | ||
|
||
class PageAdmin extends AbstractAdmin | ||
{ | ||
protected function configureFormFields(FormMapper $formMapper) | ||
{ | ||
$formMapper->add('name', 'text'); | ||
$formMapper->add('title', 'text'); | ||
$formMapper->add('slug', 'text'); | ||
$formMapper->add('description', 'text', [ | ||
'required' => false, | ||
]); | ||
$formMapper->add('keywords', 'text', [ | ||
'required' => false, | ||
]); | ||
$formMapper->add('content', 'textarea', [ | ||
'attr' => [ | ||
'class' => 'tinymce', | ||
'data-theme' => 'admin', | ||
], | ||
'required' => false, | ||
]); | ||
$formMapper->add('page_category'); | ||
$formMapper->add('active'); | ||
} | ||
|
||
protected function configureDatagridFilters(DatagridMapper $datagridMapper) | ||
{ | ||
$datagridMapper->add('title'); | ||
} | ||
|
||
protected function configureListFields(ListMapper $listMapper) | ||
{ | ||
$listMapper->addIdentifier('title'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
namespace AppBundle\Admin; | ||
|
||
use Sonata\AdminBundle\Admin\AbstractAdmin, | ||
Sonata\AdminBundle\Datagrid\ListMapper, | ||
Sonata\AdminBundle\Datagrid\DatagridMapper, | ||
Sonata\AdminBundle\Form\FormMapper; | ||
|
||
class PageCategoryAdmin extends AbstractAdmin | ||
{ | ||
protected function configureFormFields(FormMapper $formMapper) | ||
{ | ||
$formMapper->add('name', 'text'); | ||
$formMapper->add('description', 'text', [ | ||
'required' => false, | ||
]); | ||
} | ||
|
||
protected function configureDatagridFilters(DatagridMapper $datagridMapper) | ||
{ | ||
$datagridMapper->add('name'); | ||
} | ||
|
||
protected function configureListFields(ListMapper $listMapper) | ||
{ | ||
$listMapper->addIdentifier('name'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?php | ||
|
||
namespace AppBundle\Admin; | ||
|
||
use Sonata\AdminBundle\Admin\AbstractAdmin, | ||
Sonata\AdminBundle\Datagrid\ListMapper, | ||
Sonata\AdminBundle\Datagrid\DatagridMapper, | ||
Sonata\AdminBundle\Form\FormMapper; | ||
|
||
class PostAdmin extends AbstractAdmin | ||
{ | ||
protected function configureFormFields(FormMapper $formMapper) | ||
{ | ||
$formMapper->add('title', 'text'); | ||
$formMapper->add('slug', 'text'); | ||
$formMapper->add('description', 'text', [ | ||
'required' => false, | ||
]); | ||
$formMapper->add('keywords', 'text', [ | ||
'required' => false, | ||
]); | ||
$formMapper->add('content', 'textarea', [ | ||
'attr' => [ | ||
'class' => 'tinymce', | ||
'data-theme' => 'admin', | ||
], | ||
'required' => false, | ||
]); | ||
$formMapper->add('labels', 'text'); | ||
$formMapper->add('active'); | ||
} | ||
|
||
protected function configureDatagridFilters(DatagridMapper $datagridMapper) | ||
{ | ||
$datagridMapper->add('title'); | ||
} | ||
|
||
protected function configureListFields(ListMapper $listMapper) | ||
{ | ||
$listMapper->addIdentifier('title'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.