Skip to content
Snippets Groups Projects

Update file editor.module

Open IMMACULATE X requested to merge issue/drupal-3254880:3254880-25 into 11.x
2 unresolved threads

Closes #3254880

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
197 $image_entity->save();
198 }
199
200 return $image_entity;
201 }
202
203 }
204
205 }
206
207 namespace Drupal\editor\Hook {
208
209 use Drupal\Core\Entity\FieldableEntityInterface;
210 use Drupal\Tests\editor\Kernel\EditorEntityRevisionsFileUsageTest;
211
212 function _editor_get_entity_reference_revisions(FieldableEntityInterface $entity, &$result = []): array {
  • 305 305 }));
    306 306 }
    307 307
    308 /**
    309 * Get the entity reference revisions fields on an entity.
    310 *
    311 * @param \Drupal\Core\Entity\FieldableEntityInterface $entity
    312 * An entity whose fields to analyze.
    313 *
    314 * @return array
    315 * The names of the fields on this entity that entity reference revisions.
    316 */
    317 function _editor_get_entity_reference_revisions(FieldableEntityInterface $entity, &$result = []) {
  • Víctor Dorado added 223 commits

    added 223 commits

    • e6e70683...de85d081 - 212 commits from branch project:11.x
    • eda2e446 - 1 earlier commit
    • ce619b97 - Update file editor.module
    • 9794cb50 - Refactor entity CRUD hooks to follow the new Hook Class approach
    • b2fadcc1 - Check file usages for setting its temporary status AFTER deleting the usage
    • 4f71db28 - Improve documentation
    • d8daa72c - Test decrementing of translation usages when deleting the original translation
    • 5fccbd33 - Don't use the term "paragraph", but more generic "entity reference revision...
    • 94cee7bf - Add tests for entity reference revisions file usage behavior
    • 773753e4 - Remove an unnecessary check as file.usage service does the job
    • 0e0e87f1 - Revert "Remove an unnecessary check as file.usage service does the job" per...
    • a2db768f - Move _editor_get_entity_reference_revisions() function to a helper service

    Compare with previous version

  • @smustgrave It was challenging due to some oddities in the autowire system, but I’ve figured out how to move the _editor_get_entity_reference_revisions() function to a helper service. I initially tried a protected function in EditorHooks class, but using a service was the approach that allowed me to unit test it successfully.

  • added 1 commit

    • 31de6682 - Remove an unnecessary check as file.usage service does the job

    Compare with previous version

  • added 1 commit

    • db181cfa - Move _editor_get_entity_reference_revisions() function to a helper service

    Compare with previous version

  • Víctor Dorado added 99 commits

    added 99 commits

    • db181cfa...75ea9ab7 - 89 commits from branch project:11.x
    • 6d3d7ba6 - Update file editor.module
    • fafc6dcb - Update file editor.module
    • 93d6fff1 - Refactor entity CRUD hooks to follow the new Hook Class approach
    • 8e7ebc62 - Check file usages for setting its temporary status AFTER deleting the usage
    • 2292ff6d - Improve documentation
    • abe48050 - Test decrementing of translation usages when deleting the original translation
    • e642b68b - Don't use the term "paragraph", but more generic "entity reference revision...
    • 1c71673b - Add tests for entity reference revisions file usage behavior
    • 68673de6 - Remove an unnecessary check as file.usage service does the job
    • db3f070b - Move _editor_get_entity_reference_revisions() function to a helper service

    Compare with previous version

  • Víctor Dorado added 105 commits

    added 105 commits

    • db3f070b...228328d2 - 95 commits from branch project:11.x
    • 605c32a4 - Update file editor.module
    • 9c7af243 - Update file editor.module
    • 2a716f06 - Refactor entity CRUD hooks to follow the new Hook Class approach
    • 5b3ec9da - Check file usages for setting its temporary status AFTER deleting the usage
    • d8c28378 - Improve documentation
    • 57fc745c - Test decrementing of translation usages when deleting the original translation
    • 2c0e3c83 - Don't use the term "paragraph", but more generic "entity reference revision...
    • 80ee6067 - Add tests for entity reference revisions file usage behavior
    • adaf1348 - Remove an unnecessary check as file.usage service does the job
    • d8ff1aea - Move _editor_get_entity_reference_revisions() function to a helper service

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Víctor Dorado added 60 commits

    added 60 commits

    • c3d8bfc4...42b3b113 - 49 commits from branch project:11.x
    • f55c809e - 1 earlier commit
    • d62f1756 - Update file editor.module
    • 3f0b4451 - Refactor entity CRUD hooks to follow the new Hook Class approach
    • 56dba681 - Check file usages for setting its temporary status AFTER deleting the usage
    • ccd7fb5c - Improve documentation
    • 73a969cf - Test decrementing of translation usages when deleting the original translation
    • 3ea8b33e - Don't use the term "paragraph", but more generic "entity reference revision...
    • 06d7dad1 - Add tests for entity reference revisions file usage behavior
    • 873bfbf3 - Remove an unnecessary check as file.usage service does the job
    • 0fdcade1 - Move _editor_get_entity_reference_revisions() function to a helper service
    • ea8c7f80 - Fix PHPCS issues

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Please register or sign in to reply
    Loading