Comments (3)
Thank you very much, it works!
from easyadminbundle.
You can update an action per page.
https://symfony.com/bundles/EasyAdminBundle/current/actions.html#updating-an-action
For example, below code updates new
action label on index
page.
use EasyCorp\Bundle\EasyAdminBundle\Config\Action;
use EasyCorp\Bundle\EasyAdminBundle\Config\Actions;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
public function configureActions(Actions $actions): Actions
{
return $actions
->update(Crud::PAGE_INDEX, Action::NEW, function (Action $action) {
return $action->setLabel('real or keyword message to translate');
});
}
from easyadminbundle.
There's possibly an easier solution: customize the name of the entity:
public function configureCrud(Crud $crud): Crud
{
return $crud
->setEntityLabelInSingular('Utilisateur')
->setEntityLabelInPlural('Utilisateurs')
}
It won't result in the custom action title that you want, but it's almost the same and it's easier to implement and maintain in the future. In any case, closing as fixed. Cheers!
from easyadminbundle.
Related Issues (20)
- update code easyadmin
- AssociationField creating new entries as tags
- GET parameter of entity ID on Index page leads to wrong singular label of NEW action
- Allow EasyAdminTwigExtension::representAsString to use Translatable method HOT 6
- Datagrid actions button not clickable on small screen HOT 1
- Use bootstrap form-text class for fields help HOT 1
- How to add field related js without using this type of field in my page? HOT 2
- SlugField - Incorrect transliteration of the letter "Щ"
- CollectionTableField in addition to CollectionField
- disabled TextEditorField is not really disabled HOT 1
- Pass parameters to linkToCrudAction
- RenderFilters crashes when EntityDto->Instance is not set on Symfony 6.4
- Make ArrayField translatable
- Using ArrayAccess on Doctrine\ORM\Mapping\JoinColumnMapping is deprecated
- Enable filters for autocomplete action
- ChoiceField with zero choices results in an InvalidOptionsException
- Unsupported moneyphp/money package by MoneyField HOT 2
- Searching for a string on an "index" page throws an `AssertionError` when entity does not have any string property
- renderAsEmbeddedForm is not validating subfields in PROD mode but does in dev mode HOT 3
- Submitting forms in Functional Tests results in errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easyadminbundle.