Giter Club home page Giter Club logo

easyadminextensionbundle's People

Contributors

alexislefebvre avatar alterphp avatar backendtea avatar damienalexandre avatar dariotilgner avatar dylankas avatar erelke avatar gisostallenberg avatar gonzaloalonsod avatar gulaandrij avatar helios-ag avatar ionbazan avatar l396635210 avatar lyrixx avatar mmainchain avatar pierreallard avatar rimi-itk avatar sanis avatar sbeff avatar sbolch avatar selrahcd avatar tacman avatar thi3rry avatar tomasvotruba 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar

easyadminextensionbundle's Issues

Override easyadmin list

I am on symfony 3.4 and I have EasyAdminBundle list overrided. But if I add EasyAdminExtensionBundle, the TwigPathPass is overriding this and using original list twig file.

How can I achieve this?

Thanks

Embedded list in show action

Hi, can I add the embedded list in the show action? I managed to do that just in the edit action. Thanks a lot!

Deprecation Notice

Not implementing the static getExtendedTypes() method in AlterPHP\EasyAdminExtensionBundle\Form\Type\Extension\EasyAdminAutocompleteTypeExtension when implementing the Symfony\Component\Form\FormTypeExtensionInterface is deprecated since Symfony 4.2. The method will be added to the interface in 5.0.

Would be neat if that could be implemented :)

Embedded list filter not working

Hi,

I'm having trouble with one embedded list filter, declared as followed :

- { property: 'jobs', label: '', type: 'embedded_list', type_options: { entity: 'Job', filters: { 'entity.company_vendor': 'form:parent.data.worker_company.id' }} }

But it will generate a request like this :

localhost/admin/?entity=Job&action=list&filters%5Bentity.author%5D=19651a30-2b6d-11e8-aa77-24adf7d02a63&filters%5Bentity.company_vendor%5D=12117956-2b70-11e8-aa77-24adf7d02a63&sortField=start_date&sortDirection=DESC

AS you can see, it will always incude 'entity.author' in the filters, even if I do not declare it.

Any idea why ?

Thanks in advance,
Julien

Add easyadmin_admin_roles in documentation

security.yaml

    role_hierarchy:
        ROLE_USER: ROLE_USER
        ROLE_ADMIN: [ROLE_ADMIN, ROLE_USER]
        ROLE_SUPER_ADMIN: ROLE_ADMIN

Generated Form:

  • ROLE_USER
    • ROLE_USER (checkbox)
  • ROLE_ADMIN
    • ROLE_ADMIN (checkbox)
    • ROLE_USER (checkbox)

its correct?

MenuConfigPass has no token in production mode

As MenuConfigPass seems to be cached in production mode, it is generated without any user context..

So any menu item that requires a role is hidden.

We should apply filtering on display...

label are not working

symfony 3.4
easyadmin 1.17
extension: 1.3.3

            list:
                form_filters:
                    - { property: published, label: 'titi' }
                    - { property: postType, label: 'toto' }

but on the admin i got the property as the label, not my own label

why?

MenuIndex error when has no role

Easyadmin assigns a menuIndex and a submenuIndex to each menu item. In this bundle if you have no role for viewing that entity, the menu item is not displayed. but the menuIndex is not changed.
So if you click on the next item. It puts active the next item in the menu. I think I am not explaining me as well as I want. Let me show in some pictures.

  • Stats -> menuIndex: 0

  • Client -> menuIndex: 1

  • User -> menuIndex: 2

  • Ticket -> menuIndex: 3

  • Client -> menuIndex: 4
    captura de pantalla de 2018-06-14 15 42 43
    This one is correct. You enter "User" and it activates "user" menu item.

  • Stats -> menuIndex: 0

  • Client -> menuIndex: 1

  • Ticket -> menuIndex: 3

  • Client -> menuIndex: 4
    captura de pantalla de 2018-06-14 15 44 11
    When you have no ROLE for "user" if you enter "Ticket" it jumps one number and highlights the following item.

Roles not applying

Symfony 4.2.4, seems like roles for entities work but it doesn't for properties.
E.g. this works

Cat:
    class: App\Entity\Cat
    role: ROLE_ADMIN

but following does not apply

Post:
    class: App\Entity\Post
    controller: App\Controller\AdminController
    list:
        fields:
            - { property: 'visible', role: ROLE_ADMIN }

(checked in debugger, roles for the current user are OK)

Form Select

Add new entity in select, display modal.
Assigned to me

Override layout

Hi !
I used EasyAdminBundle (2.1) and I override the layout template thanks to my custom twig template inside template/bundles/EasyAdminBundle/default/layout.html.twig

But if I add EasyAdminExtensionBundle, the layout was not override anymore.
I try to define my custom template inside template/bundles/EasyAdminExtensionBundle/default/layout.html.twig, without any luck.

I allready look this issue : #25, but I think this was before the new EasyAdminBundle.

Thanks for your help !

Dispatch custom event on filterQueryBuilder

Hello,
Thanks for the great bundle.

I was thinking about adding some cases to the list filterQueryBuilder or changing the generated dql string, for example if a custom event ( something like BEFORE_FILTER_FIELD ) is called with the filter field data before applying the dql part to the query builder so that I can format the value before applying it or call some sql functions in the dql string in my event listener.
Is that possible ?

Autocomplete allows creation when not found does not work

Hi,

I have a problem with one of my forms. In my form I have a field of type "easyadmin_autocomplete" as if below.

- property: 'questions' type: 'easyadmin_autocomplete' type_options: { attr: { create: true } }

capture d ecran du 2019-01-10 18-17-45

The problem is that when no data is found I do not have the button to create.

Versions :

  • "alterphp/easyadmin-extension-bundle": "2.0.1"

  • "easycorp/easyadmin-bundle": "^2.0",

Having found no solution after watching the docs and forums, I post my problem here.

Show menu entry only if user is not authenticated

Hi there,

is there a way to show menu entries only if a user is not authenticated?
Using IS_AUTHENTICATED_ANONYMOUSLY is not possible, because that role every user has.
I want to show Register and Login only to not authenticated users.

Thanks!
Markus

There is no extension able to load the configuration for "easy_admin_bundle

There is no extension able to load the configuration for "easy_admin_bundle
!! " (in /NetBeansProjects/map2u_react/config/packages/easy_admin.yaml). Looke
!! d for namespace "easy_admin_bundle", found "framework", "doctrine_cache", "
!! doctrine", "doctrine_fixtures", "sensio_framework_extra", "monolog", "doctr
!! ine_migrations", "security", "swiftmailer", "twig", "white_october_pagerfan
!! ta", "debug", "web_profiler", "web_server", "easy_admin", "stof_doctrine_ex
!! tensions", "uerka_translation_form", "easy_deploy", "easy_admin_extension"

in the esay_admin.yaml file

easy_admin_bundle:
resource: '@EasyAdminExtensionBundle/Controller/AdminController.php'
prefix: /admin
type: annotation

[Insight] Object parameters should be type hinted - in src/Helper/EmbeddedListHelper.php, line 134

Violation reported by SensioLabInsight. We call getId method on unknwon object.
=> method may not exist.

Is it possible to get identifiers without parsing each of related object (from collection ?) ?

@rimi-itk any idea ?

in src/Helper/EmbeddedListHelper.php, line 134

The parameter entity, which is an object, should be typehinted.

                // ManyToMany association
                elseif (isset($assoc['joinTable'])) {
                    $relatedItems = PropertyAccess::createPropertyAccessor()->getValue(
                        $parentEntity, $parentEntityProperty
                    );
                    $itemIds = $relatedItems->map(function ($entity) {
                        return $entity->getId();
                    });

                    return ['entity.id' => $itemIds->toArray()];
                }

Posted from SensioLabsInsight

Can't configure form_filter with "choice" type, when field is relation

I tried this in YAML config:

form_filters:
  - property: relation
    label: Relation
    type: choice
    type_options:
      choices:
        Baum: 1
        Kuchen: 2

And got the error: The option "class" does not exist.

This occures because of \AlterPHP\EasyAdminExtensionBundle\Configuration\ListFormFiltersConfigPass::configureAssociationFilter method, which always adds "class" and "multiple" options, regardless the current set type.

This condition fixed it for me:

        if ($filterConfig['type'] !== ChoiceType::class) {
            $defaultTypeOptions = [
                'class' => $associationMapping['targetEntity'],
                'multiple' => true,
            ];
        } else {
            $defaultTypeOptions = [
                'multiple' => true,
            ];
        }

        $filterConfig['type_options'] = \array_merge(
            $defaultTypeOptions,
            $filterConfig['type_options'] ?? []
        );

Please tell me, when I should provide a pull request.
Thanks!

How to use embedded_list in custom twig template?

Hi,
first thank for this very cool extension of EAB!

I'd like to use the embedded_list manually in a custom show view. What works for me is calling this in Twig template:

{{ easyadmin_render_field_for_show_view(_entity_config.name, entity, _entity_config.show.fields.myField) }}

But I have to configure the field in "show" section to get a resolved config array, which I pass with _entity_config.show.fields.myField, which double output the embedded list, when I also want to output {{ block('show_fields') }} of extending show template.

Is there a way to configure fields, which get merged with template stuff etc. but without using one of the actual base actions?

I hope you get my point and can help.
Thanks in advance!

Loading bunde in Symfony 4.x

Hi,

I'm using Symfony Flex with Symfony 4.1 in my project. Since I saw there's no recipe to install the bundle I tried to manually load it adding

AlterPHP\EasyAdminExtensionBundle\EasyAdminExtensionBundle::class => ['all' => true],

in bundles.php, which gives me the next error:

(1/1) ClassNotFoundException
Attempted to load class "EasyAdminExtensionBundle" from namespace "AlterPHP\EasyAdminExtensionBundle".
Did you forget a "use" statement for another namespace?

Any hint about how to use it with Flex? Thanks.

EasyCorp\Bundle\EasyAdminBundle\Form\Util\FormTypeHelper

Version master:

Attempted to call an undefined method named "getType" of class "EasyCorp\Bundle\EasyAdminBundle\Form\Util\FormTypeHelper".

alterphp\easyadmin-extension-bundle\src\Configuration\ShortFormTypeConfigPass.php:89

Guesser for embedded lists

We should not have to state the relation for an embedded list if it is the same defined in the ORM metadata. Try to explore ORM metadata to determine it.

bug: Can't use EasyAdminExtensionBundle with EasyAdmin v1.17.14

Hello,

I try to install the Extension bundle with a fresh new project but Composer won't let me do that :

    composer require alterphp/easyadmin-extension-bundle
    Using version ^1.2 for alterphp/easyadmin-extension-bundle
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Your requirements could not be resolved to an installable set of packages.

    Problem 1
- Conclusion: don't install alterphp/easyadmin-extension-bundle v1.2.7
- Conclusion: don't install alterphp/easyadmin-extension-bundle v1.2.6
- Conclusion: don't install alterphp/easyadmin-extension-bundle v1.2.5
- Conclusion: don't install alterphp/easyadmin-extension-bundle v1.2.4
- Conclusion: don't install alterphp/easyadmin-extension-bundle v1.2.3
- Conclusion: don't install alterphp/easyadmin-extension-bundle v1.2.2
- Conclusion: don't install alterphp/easyadmin-extension-bundle v1.2.1
- Conclusion: remove pagerfanta/pagerfanta v2.0.1
- Installation request for alterphp/easyadmin-extension-bundle ^1.2 -> satisfiable by alterphp/easyadmin-extension-bundle[v1.2, v1.2.1, v1.2.2, v1.2.3, v1.2.4, v1.2.5, v1.2.6, v1.2.7].
- Conclusion: don't install pagerfanta/pagerfanta v2.0.1
- alterphp/easyadmin-extension-bundle v1.2 requires pagerfanta/pagerfanta ~1.0,>=1.0.1 -> satisfiable by pagerfanta/pagerfanta[v1.0.1, v1.0.2, v1.0.3, v1.0.4, v1.0.5, v1.1.0].
- Can only install one of: pagerfanta/pagerfanta[v1.0.1, v2.0.1].
- Can only install one of: pagerfanta/pagerfanta[v1.0.2, v2.0.1].
- Can only install one of: pagerfanta/pagerfanta[v1.0.3, v2.0.1].
- Can only install one of: pagerfanta/pagerfanta[v1.0.4, v2.0.1].
- Can only install one of: pagerfanta/pagerfanta[v1.0.5, v2.0.1].
- Can only install one of: pagerfanta/pagerfanta[v1.1.0, v2.0.1].
- Installation request for pagerfanta/pagerfanta (locked at v2.0.1) -> satisfiable by pagerfanta/pagerfanta[v2.0.1].


    Installation failed, reverting ./composer.json to its original content.

This is because EasyAdminBundle use pagerfanta ~2.0 but not ExtensionBundle. I suggest to use 2.0 version. Is this doable? Should I/We use a different approach?

I'm here to help if needed.

PHP version

Hi!

There is really no way to used it in PHP 5.6 and on Symfony 2.8? I have worked with those versions and it is not possible to update them.

Autocomplete add new option 'create' -> does not work for me

Hi there, I'm facing an issue, that the create option for the autocomplete field is not shown.
Saw the issue #91 but unfortunately I'm not dealing with self written templates. I'm using the default ones. Have no idea how I get that working.

image

image

"alterphp/easyadmin-extension-bundle": "^2.1",
"easycorp/easyadmin-bundle": "^2.0",

Any help is appreciated.

Regards
Markus

The option "choices_static_callback" does not exist

When I am trying to set up a form filter like follow:

- { property: status, type_options: { choices: { New: 0, Read: 1, Archived: 2 } } }

- { name: statusType, property: status, type_options: { choices_static_callback: [getValuesList, [status, true]] } }

Error thrown:

The option "choices" does not exist.

OR

The option "choices_static_callback" does not exist. Defined options are: "action", "allow_extra_fields", "allow_file_upload", "attr", "auto_initialize", "block_name", "by_reference", "compound", "constraints", "csrf_field_name", "csrf_message", "csrf_protection", "csrf_token_id", "csrf_token_manager", "data", "data_class", "disabled", "documentation", "empty_data", "error_bubbling", "error_mapping", "extra_fields_message", "grouping", "help", "inherit_data", "invalid_message", "invalid_message_parameters", "label", "label_attr", "label_format", "mapped", "method", "post_max_size_message", "property_path", "required", "rounding_mode", "scale", "translation_domain", "trim", "upload_max_size_message", "validation_groups".

Version installed

alterphp/easyadmin-extension-bundle v2.1.0
easycorp/easyadmin-bundle v2.0.4

What am I missing here?

How to add a filter dropdown

How can I add a dropdown beside of the search field and redirect users to this filterlink.
Is there a tutorial?

Thank for your support.

Many-to-many in form_filter

Hello,

I've add 2 form_filter

but only 1 appear
the first is a select for a status field, OK (only is not a toggle but a select list)
the second is a manyToMany I've trying 3 methods

form_filters:
 
     - status
     - { property: categories, type_options: { choices: { Categorie: categorie } } }
     - { property: categories, type_options: { choices: { Categorie: name} } }
     - categories

I add trait (ValueListTrait) in my Entity (parent entity), but nothing work.

I use 2.0.3 /symfony 4.2.2

Thank You!

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.