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.

  • Víctor Dorado added 1 commit

    added 1 commit

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

    Compare with previous version

  • Víctor Dorado added 1 commit

    added 1 commit

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

    Compare with previous version

  • Please register or sign in to reply
    Loading