Created
December 18, 2019 16:30
-
-
Save dvlpp/f8414c18600b8fb46955790f922602b2 to your computer and use it in GitHub Desktop.
SpaceshipSharpShow embedded list with filter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class SpaceshipSharpShow extends SharpShow | |
{ | |
function buildShowFields() | |
{ | |
// [...] | |
$this | |
->addField( | |
SharpShowEntityListField::make("pilots", "pilot") | |
->hideFilterWithValue("spaceship", function($instanceId) { | |
return $instanceId; | |
}) | |
->showEntityState(false) | |
->showCreateButton() | |
); | |
} | |
// [...] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment