-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure search result link in admin #3682
Conversation
"Configurare" 😉 |
*/ | ||
public function getSearchResultLink($object) | ||
{ | ||
if ($this->hasRoute($this->searchResultAction) && $this->isGranted(strtoupper($this->searchResultAction), $object)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linebreak this please
0152be5
to
54038e4
Compare
With your PR, the default action can be changed by overriding the property, right? |
👍 can you create a PR for 3.0 after the merge @core23 |
Yes, you can override the property in the specific Admin class @greg0ire I will do, after merging this @OskarStark |
@core23 Could you please add some tests? |
done @soullivaneuh |
This adds a new method to the API, should probably be tagged as |
No answer… let's merge! |
Any chance to have some updated documentation? |
Almost clicked the button |
|
||
In general the search result generates a link to the edit action of an item or is using the show action, if the edit | ||
route is disabled or you haven't the required permission. You can change this behaviour by overriding the | ||
``searchResultActions``. The defined actions will we used sequential until a route with the required permissions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- "the
searchResultActions
method" - "will we used sequential" ?!?
@@ -1024,4 +1024,14 @@ public function checkAccess($action, $object = null); | |||
* | |||
*/ | |||
// public function configureActionButtons($action, $object = null); | |||
|
|||
//TODO: uncomment this method for 3.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for 4.0 @core23
According to the new Sonata version management and next major release plan, this project has been refactored regarding branching and versioning. If you see this message, your PR concerns a patch or a minor release and is not targeting the right branch. So I'm closing this one, but don't see it as a refusal. If you think your work is still relevant and want to continue, feel free to reopen it on the right branch (e.g. the default one). Regards. |
Refs #3772 |
This commit allows you to configure the search result link for each admin separately
Fixes (partial) #2581, #3092
It's kind of hard where to configure the default
action
for the link. Should the **Admin class define the final action or should a global config value override it.