Skip to content
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

318 - Read-only feed data #25

Merged
merged 9 commits into from
Nov 30, 2023
Merged

Conversation

cableman
Copy link
Contributor

@cableman cableman commented Nov 27, 2023

Link to ticket

https://jira.itkdev.dk/browse/EV-318

Description

  • Mark all data from feeds as editable (true|false).
  • Rename ADR 006 to markdown.
  • Add ADR 007 about editable content.
  • Added image fixture.
  • Updated UI with edit action based on editable field in entities.
  • Added "show" entity action to UI.

Screenshot of the result

N/A

Checklist

  • My code is covered by test cases.
  • My code passes our test (all our tests).
  • My code passes our static analysis suite.
  • My code passes our continuous integration process.

If your code does not pass all the requirements on the checklist you have to add a comment explaining why this change
should be exempt from the list.

Additional comments or questions

N/A

@cableman cableman force-pushed the feature/318-readonly-feed-data branch 2 times, most recently from 3868bdc to b313ce7 Compare November 27, 2023 12:37
@cableman cableman force-pushed the feature/318-readonly-feed-data branch from b313ce7 to a47fd64 Compare November 27, 2023 12:38
@cableman cableman changed the title 318 - Read only feed data 318 - Read-only feed data Nov 27, 2023
@cableman cableman force-pushed the feature/318-readonly-feed-data branch from 37d5787 to 07a1c76 Compare November 27, 2023 15:34
@cableman cableman force-pushed the feature/318-readonly-feed-data branch from 2b8e2da to 5081578 Compare November 27, 2023 15:53
@cableman cableman marked this pull request as ready for review November 28, 2023 09:28
src/Controller/Admin/LocationCrudController.php Outdated Show resolved Hide resolved
src/Entity/Address.php Show resolved Hide resolved
src/DataFixtures/EventFixture.php Show resolved Hide resolved
Comment on lines 23 to 25
$interfaces = class_implements($entity);

return !isset($interfaces[EditableEntityInterface::class]) || $entity->isEditable();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't you use

Suggested change
$interfaces = class_implements($entity);
return !isset($interfaces[EditableEntityInterface::class]) || $entity->isEditable();
return !($entity instanceof EditableEntityInterface) || $entity->isEditable();

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I like to take the long road ... and the PHP docs says:

determine whether a PHP variable is an instantiated object of a certain class...

Not implements interface... but I see if you scroll down and down and down in the documentation... they use it on an interface as example... way down

@cableman cableman merged commit 6925de0 into develop Nov 30, 2023
7 checks passed
@cableman cableman deleted the feature/318-readonly-feed-data branch November 30, 2023 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants