sharp icon indicating copy to clipboard operation
sharp copied to clipboard

SharpShowEntityTextField

Open hichxm opened this issue 3 years ago • 2 comments

In my case, I need to link two resources. The following code represents the owner name of the current showing server.

// Before
SharpShowTextField::make('user:name')
    ->setLabel('Owner')

// After - represent link to user show entity
SharpShowEntityTextField::make('user:name', 'user')
    ->setLabel('Owner')

I think that is a good feature, and I go work on it, probably this weekend.

hichxm avatar Jan 26 '22 23:01 hichxm

To be simple : Is a new SharpShowField to create a link to entity relation.

hichxm avatar Jan 27 '22 00:01 hichxm

What would be the result? a label (user:name) with a href link to the user show page / form? How do you pass the user's id? Anyway this could be something useful, I agree, but I need a more detailed example (with the full class) to figure this out. And be sure to look at this page first: https://sharp.code16.fr/docs/guide/link-to.html#create-links-to-an-entity

dvlpp avatar Jan 27 '22 08:01 dvlpp

I'm closing this because it's inactive since a long time.

dvlpp avatar Jun 08 '23 12:06 dvlpp