Giter VIP home page Giter VIP logo

easyadminplusbundle's Introduction

EasyAdminPlusBundle

❗ If you want to use EasyAdminBundle 1.x, browse EasyAdminPlusBundle 1.x

About

EasyAdminPlusBundle is a Symfony 4 wrapper for the amazing EasyCorp/EasyAdminBundle which includes some extra features.

Features

  • Admin management to restrict access to the secure area.
  • Provide a generator to guess the default EasyAdmin configuration based on Doctrine Types', Annotations' & Asserts' reflection + support popular 3rd party bundles.
  • Add an action to manage translations files.
  • ACL to restrict access based on entity/action role permissions (now directly in EasyAdmin #2806, #2810, #2829)
  • Add an action to export entities in CSV.
  • Add some useful new templates for Show and List actions

Requirements

  • PHP >= 7.1
  • Symfony 4
  • EasyAdminBundle ^2.0

Install

$ composer require wandi/easyadmin-plus-bundle

Replace EasyAdmin controller

Load routes from our AdminController or yours but make sure it extends WandiEasyAdminPlusBundle Controller

# config/routes/easy_admin.yaml
easy_admin_bundle:
    resource: '@WandiEasyAdminPlusBundle/Controller/AdminController.php'
    prefix: /admin
    type: annotation

Getting started

  1. Migrate from EasyAdminPlusBundle 1.x
  2. Authentication
  3. Generator
  4. Translation Action
  5. ACL
  6. Export Action
  7. Additional Templates

easyadminplusbundle's People

Contributors

kasou avatar laurent-bientz avatar rampmaster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easyadminplusbundle's Issues

Using multiple extensions with EasyAdmin

Hello!

We decided to use this bundle for our project especially for the export function.

We are trying to use some features from another EasyAdmin Extension (AlterPHP) as well but we face some issues configurating both of them at the same time.

I contacted the author of AlterPHP/EasyAdminExtensionBundle and we modified the controller to use a trait so that you can just use it in your custom controller instead of having your class extends your controller. It's very useful since multiple extensions want you to extends their controller so it's better to be able to use it's trait.

I may not be really clear about what I'm saying so you could look up the issue I posted on AlterPHP :

Would you be okay if I modified it just like this PR and made one for your extension ?

Thanks in advance.

instalation issue. Attempted to load class "ContainerAwareCommand"

I have an error when execute the wandi:easy-admin-plus:user:create admin password
I have the PHP version 7.3.9
This is the error:

$ php bin/console wandi:easy-admin-plus:user:create admin admin
Symfony\Component\ErrorHandler\Error\ClassNotFoundError^ {#456
#message: """
Attempted to load class "ContainerAwareCommand" from namespace "Symfony\Bundle\FrameworkBundle\Command".\n
Did you forget a "use" statement for another namespace?
"""
#code: 0
#file: "C:\test2\OSPanel\domains\football\vendor\wandi\easyadmin-plus-bundle\src\Auth\Command\UserCreateCommand.php"
#line: 14

What about adding Filter in your bundle ?

I'm currently looking for a EasyAdmin extension to add Multi field Filtering. Maybe it could be better to have only one extension bundle.

Do you work on something like this ? Or can i Make a pull request when I'm done ?

Thanks for any info.

Add new templates for Vich

In List and Show actions, Javier only concats the value stored in database with a base_path, but if we have custom directory namer, it failed.

Add 2 new templates to handle properly Vich files.

Error on generate entities

Hello,

I installed and followed the first part about authentication.
However during the second part on the generator, I get an error while trying to use
php bin/console wandi:easy-admin-plus:generator:generate

The error:

In PropertyTypeHelper.php line 179:
Notice: Undefined index: EasyAdminType

Thanks by advance for your help !

Cheers
JB.

bundle name mismatch

When you (from README)

composer require wandi/easyadminplus-bundle

composer pulls a bundle tagged 0.0.1 and will not trigger the recipe for sf4.

After some digging, I found that you registered this bundle in packagist with the name wandi/easyadmin-plus-bundle.

composer require wandi/easyadmin-plus-bundle

works as expected.

You have requested a non-existent service

Hi,

After following the install instruction, I'm getting the following error when I try to display the admin :

You have requested a non-existent service "wandi.easy_admin_plus.acl.security.admin_authorization_checker".

Thanks in advance for your help,
Julien

Virtual properties are always null in export

My Alpha class has a property Beta which is a ManyToOne with the Beta class. I'm trying to include some fields of this Beta property in the export of the Alpha class but everything i've tried results in null.
I've tried:

export:
    fields:
        - { property: 'beta.id', label: 'Beta ID' }

And i've tried to add a public method getBetaId() in the Alpha class, then in the export i add it as it says in the EasyAdmin documentation on how to add a virtual property (https://symfony.com/doc/1.x/bundles/EasyAdminBundle/book/list-search-show-configuration.html#virtual-properties) because in the documentation of EasyAdminPlus it's told that export works like list:

export:
    fields:
        - { property: 'betaId', label: 'Beta ID' }

Is there a way to export a virtual property?

Demo application.

Hello there,

First of all mate thank you for the effort it is highly appreciated, i want to check whether there is a demo application repository where i can test and checkout all the different features this bundle provides.
Thank you .

Export and new action issue

Hi there,

I've an issue when I want to disable the "new" action on a particular entity and when the export action is enable. Both actions disapears of the back-office instead of keeping the export action displayed.

# app/config/packages/easy_admin.yaml

easy_admin:
    site_name: 'Easy admin"'
    entities:
        # List the entity class name you want to manage
        User:
            class: App\Entity\User
            disabled_actions: ['new']
            export:

    ...

Cheers Wandi 👍

Auth - Add a role param

@jacquesndl

We need a roles param into the command wandi:easy-admin-plus:user:create

php bin/console wandi:easy-admin-plus:user:create --username=jacques --password=pwd --roles=[ROLE_ADMIN]

It'll be also nice to have a new cmd to change admin roles

`wandi:easy-admin-plus:user:change-roles` --username=jacques --roles=[ROLE_USER]

😛

Generator breaks the default translation domain

@kasou

The generator write this default setting in the EasyAdmin config

# config/packages/easy_admin/design.yaml
easy_admin:
    translation_domain: EasyAdminPlusBundle

This setting break some translations In EasyAdmin base.

So just remove this generation in GeneratorGenerate:

$generatorTool->initTranslation($this->parameters['translation_domain'], $this->projectDir, $locale);

thx

Issue on install and cache:clear

I have an error when execute the cac:cle after install the plugin. I have the PHP version 7.3. This is the error:

!! ArgumentCountError {#5649 !! #message: "Too few arguments to function Symfony\Component\Config\Definition\Builder\TreeBuilder::__construct(), 0 passed in /Users/hectorsantosmejias/Work/Pixea/Caminos60/web/vendor/wandi/easyadmin-plus-bundle/src/DependencyInjection/Configuration.php on line 21 and at least 1 expected" !! #code: 0 !! #file: "./vendor/symfony/config/Definition/Builder/TreeBuilder.php" !! #line: 26 !! trace: { !! ./vendor/symfony/config/Definition/Builder/TreeBuilder.php:26 { …} !! ./vendor/wandi/easyadmin-plus-bundle/src/DependencyInjection/Configuration.php:21 { …} !! ./vendor/symfony/config/Definition/Processor.php:50 { …} !! ./vendor/wandi/easyadmin-plus-bundle/src/DependencyInjection/WandiEasyAdminPlusExtension.php:24 { …} !! ./vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php:76 { …} !! ./vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php:39 { …} !! ./vendor/symfony/dependency-injection/Compiler/Compiler.php:91 { …} !! ./vendor/symfony/dependency-injection/ContainerBuilder.php:734 { …} !! ./vendor/symfony/http-kernel/Kernel.php:545 { …} !! ./vendor/symfony/http-kernel/Kernel.php:126 { …} !! ./vendor/symfony/framework-bundle/Console/Application.php:169 { …} !! ./vendor/symfony/framework-bundle/Console/Application.php:75 { …} !! ./vendor/symfony/console/Application.php:141 { …} !! ./bin/console:42 { !! › $application = new Application($kernel); !! › $application->run($input); !! › !! arguments: { !! $input: Symfony\Component\Console\Input\ArgvInput {#3 …} !! } !! } !! } !! } !!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.