Browse Source

Renomage du bundle

tags/0.1
Fab 3 years ago
parent
commit
56ba4ea3d4
9 changed files with 15 additions and 15 deletions
  1. +5
    -5
      Controller/Admin/AbstractCrudController.php
  2. +1
    -1
      Controller/Admin/DashboardController.php
  3. +1
    -1
      DependencyInjection/LcSovExtension.php
  4. +1
    -1
      Field/CollectionField.php
  5. +1
    -1
      Field/FileManagerField.php
  6. +1
    -1
      Field/GalleryManagerField.php
  7. +3
    -3
      LcSovBundle.php
  8. +1
    -1
      Resources/views/crud/edit.html.twig
  9. +1
    -1
      Resources/views/crud/new.html.twig

+ 5
- 5
Controller/Admin/AbstractCrudController.php View File

{ {
if (in_array(TranslatableInterface::class, class_implements($this->getEntityFqcn()))) { if (in_array(TranslatableInterface::class, class_implements($this->getEntityFqcn()))) {
$actions->update(Crud::PAGE_INDEX, Action::EDIT, function (Action $action) { $actions->update(Crud::PAGE_INDEX, Action::EDIT, function (Action $action) {
return $action->setTemplatePath('@Sov/crud/action/translatable.html.twig');
return $action->setTemplatePath('@LcSov/crud/action/translatable.html.twig');
}); });
} }


{ {
return $crud return $crud
->overrideTemplates([ ->overrideTemplates([
'crud/edit' => '@Sov/crud/edit.html.twig',
'crud/new' => '@Sov/crud/new.html.twig'
'crud/edit' => '@LcSov/crud/edit.html.twig',
'crud/new' => '@LcSov/crud/new.html.twig'
]) ])
// don't forget to add EasyAdmin's form theme at the end of the list // don't forget to add EasyAdmin's form theme at the end of the list
// (otherwise you'll lose all the styles for the rest of form fields) // (otherwise you'll lose all the styles for the rest of form fields)
->setFormThemes(['@Sov/crud/form_theme.html.twig', '@FOSCKEditor/Form/ckeditor_widget.html.twig']);
->setFormThemes(['@LcSov/crud/form_theme.html.twig', '@FOSCKEditor/Form/ckeditor_widget.html.twig']);
} }




// the argument of these methods is passed to the asset() Twig function // the argument of these methods is passed to the asset() Twig function
// CSS assets are added just before the closing </head> element // CSS assets are added just before the closing </head> element
// and JS assets are added just before the closing </body> element // and JS assets are added just before the closing </body> element
->addJsFile('bundles/lcadmin/js/utils.js');
->addJsFile('bundles/lc_sov/js/utils.js');
} }


/* /*

+ 1
- 1
Controller/Admin/DashboardController.php View File



public function index(): Response public function index(): Response
{ {
return $this->render('@Sov/dashboard.html.twig');
return $this->render('@LcSov/dashboard.html.twig');
} }


public function configureDashboard(): Dashboard public function configureDashboard(): Dashboard

DependencyInjection/SovExtension.php → DependencyInjection/LcSovExtension.php View File

use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;




class SovExtension extends Extension implements PrependExtensionInterface
class LcSovExtension extends Extension implements PrependExtensionInterface
{ {





+ 1
- 1
Field/CollectionField.php View File

return (new self()) return (new self())
->setProperty($propertyName) ->setProperty($propertyName)
->setLabel($label) ->setLabel($label)
->setTemplatePath('@Sov/crud/field/collection.html.twig')
->setTemplatePath('@LcSov/crud/field/collection.html.twig')
->setFormType(CollectionType::class) ->setFormType(CollectionType::class)
->addCssClass('field-collection') ->addCssClass('field-collection')
->addJsFiles('bundles/lcadmin/js/form-type-collection-array.js') ->addJsFiles('bundles/lcadmin/js/form-type-collection-array.js')

+ 1
- 1
Field/FileManagerField.php View File

return (new self()) return (new self())
->setProperty($propertyName) ->setProperty($propertyName)
->setLabel($label) ->setLabel($label)
->setTemplatePath('@Sov/crud/field/image.html.twig')
->setTemplatePath('@LcSov/crud/field/image.html.twig')
->addJsFiles('bundles/lcadmin/js/form-type-file-manager.js') ->addJsFiles('bundles/lcadmin/js/form-type-file-manager.js')
->setFormType(FileManagerType::class) ->setFormType(FileManagerType::class)
->addCssClass('field-text') ->addCssClass('field-text')

+ 1
- 1
Field/GalleryManagerField.php View File

return (new self()) return (new self())
->setProperty($propertyName) ->setProperty($propertyName)
->setLabel($label) ->setLabel($label)
->setTemplatePath('@Sov/crud/field/collection.html.twig')
->setTemplatePath('@LcSov/crud/field/collection.html.twig')
->setFormType(CollectionType::class) ->setFormType(CollectionType::class)
->addCssClass('field-collection') ->addCssClass('field-collection')
->addJsFiles('bundles/lcadmin/js/form-type-collection.js') ->addJsFiles('bundles/lcadmin/js/form-type-collection.js')

SovBundle.php → LcSovBundle.php View File



namespace Lc\SovBundle; namespace Lc\SovBundle;


use Lc\SovBundle\DependencyInjection\SovExtension;
use Lc\SovBundle\DependencyInjection\LcSovExtension;
use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\HttpKernel\Bundle\Bundle;




class SovBundle extends Bundle
class LcSovBundle extends Bundle
{ {
public function getContainerExtension() public function getContainerExtension()
{ {
return new SovExtension();
return new LcSovExtension();
} }
} }

+ 1
- 1
Resources/views/crud/edit.html.twig View File



{% block body_javascript %} {% block body_javascript %}
{{ parent() }} {{ parent() }}
{% include '@Sov/crud/filemanager/file-manager-modal.html.twig' %}
{% include '@LcSov/crud/filemanager/file-manager-modal.html.twig' %}
{% endblock %} {% endblock %}

+ 1
- 1
Resources/views/crud/new.html.twig View File



{% block body_javascript %} {% block body_javascript %}
{{ parent() }} {{ parent() }}
{% include '@Sov/crud/filemanager/file-manager-modal.html.twig' %}
{% include '@LcSov/crud/filemanager/file-manager-modal.html.twig' %}
{% endblock %} {% endblock %}



Loading…
Cancel
Save