-
Notifications
You must be signed in to change notification settings - Fork 50
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
Checklist Prototypes #5930
Checklist Prototypes #5930
Conversation
pmattmann
commented
Sep 16, 2024
•
edited
Loading
edited
- Entity
- Repository
- Migration
- Security
- Fixture
- UnitTest
if (is_iterable($operation->getUriVariables())) { | ||
// UriVariable is Link, toProperty is set, fromClass is a entity | ||
foreach ($operation->getUriVariables() as $uriVariable) { | ||
if (is_a($uriVariable, Link::class) | ||
&& is_string($uriVariable->getToProperty()) | ||
&& is_a($uriVariable->getFromClass(), HasId::class, true) | ||
) { | ||
// value of toProperty is NULL; Read of its ID will throw Exception | ||
// -> invalid | ||
if (null == $entity->{$uriVariable->getToProperty()}) { | ||
return false; | ||
} | ||
} | ||
} | ||
} |
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.
@usu:
Please also direct your focus here
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.
Tested the api from the browser, it works.
You can use the following script in your local browser against localhost:3004:
https://gist.github.com/BacLuc/8d34ecc1d1544e2e52d6db3895b46903
You need to change the CheckListItemRepository in the following way:
$checklistQry->join(UserCamp::class, 'uc', Join::WITH, 'c.camp = uc.camp OR (c.camp IS NULL AND c.isPrototype = true)');
that an ADMIN can create a nested checklist item for a prototype
Entity, Processor, UnitTests
c49bf35
to
9c389b0
Compare