Skip to content
Snippets Groups Projects

Issue #3347343: Continuation Add Views EntityReference filter to be available for all entity reference fields

Open Issue #3347343: Continuation Add Views EntityReference filter to be available for all entity reference fields

Merge request reports

Members who can merge are allowed to add commits.

Merge request pipeline #427426 canceled

Merge request pipeline canceled for 96b573d1

Code Quality is loading
Ready to merge by members who can write to the target branch.
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 328 ];
    329 }
    330
    331 /**
    332 * Change the required to conditionally required only to prevent focus errors.
    333 *
    334 * @param array $element
    335 * The form element.
    336 * @param string $sub_handler
    337 * The sub handler to conditionally require the field for.
    338 */
    339 protected function setRequiredViaStatesOnChildren(array &$element, $sub_handler) {
    340 if (isset($element['#required']) && $element['#required']) {
    341 $element['#required'] = FALSE;
    342 $element['#element_validate'][] = [static::class, 'validateRequired'];
    343 // @todo Conditionally required does not work within config handler extra.
  • 357 /**
    358 * Validates that a required field for a sub handler has a value.
    359 *
    360 * @param array $element
    361 * The cardinality form render array.
    362 * @param \Drupal\Core\Form\FormStateInterface $form_state
    363 * The form state.
    364 */
    365 public static function validateRequired(array &$element, FormStateInterface $form_state): void {
    366 if (!empty($element['value'])) {
    367 return;
    368 }
    369
    370 // Config extra handler does not output validation messages and
    371 // closes the modal with no feedback to the user.
    372 // @todo Find or create a core issue and link here.
  • Tavi Toporjinschi added 271 commits

    added 271 commits

    • 1bc7bda7...676c1dad - 264 commits from branch project:11.x
    • 778f1c1b - feat: Re-apply patch to 11.x
    • 1cffd374 - Fix tests.
    • dee511f5 - Issue 3347343: Rename kernel test file and class names - FilterEntityReferenceTest.
    • 9bb42f50 - Fix CSpell fail.
    • 7ba2fed2 - Fix CSpell fail 2.
    • a7428a8f - Do not limit filters available to Content Entities, use EntityTypeInterface instead.
    • b548c183 - Do not limit filters available to Content Entities, use EntityTypeInterface instead 2.

    Compare with previous version

  • added 8 commits

    • 666f9e98 - 1 commit from branch project:11.x
    • 084afa22 - feat: Re-apply patch to 11.x
    • 7525c4f4 - Fix tests.
    • 25ac40c8 - Issue 3347343: Rename kernel test file and class names - FilterEntityReferenceTest.
    • c078c8c9 - Fix CSpell fail.
    • 69336b9a - Fix CSpell fail 2.
    • 8ccd7f8d - Do not limit filters available to Content Entities, use EntityTypeInterface instead.
    • 208deaa4 - Do not limit filters available to Content Entities, use EntityTypeInterface instead 2.

    Compare with previous version

  • added 1 commit

    • 92d5e698 - Add Tests for Filter of Config Entities References.

    Compare with previous version

  • added 1 commit

    • abadbd5c - Add Tests for Filter of Config Entities References - fix CS.

    Compare with previous version

  • added 11 commits

    • abadbd5c...76fac09c - 2 commits from branch project:11.x
    • f56ce4d7 - feat: Re-apply patch to 11.x
    • 85387e40 - Fix tests.
    • 4aabdf77 - Issue 3347343: Rename kernel test file and class names - FilterEntityReferenceTest.
    • 51f71692 - Fix CSpell fail.
    • 06c9bf12 - Fix CSpell fail 2.
    • 9e91584a - Do not limit filters available to Content Entities, use EntityTypeInterface instead.
    • 5ffaf3e5 - Do not limit filters available to Content Entities, use EntityTypeInterface instead 2.
    • a140f6d5 - Add Tests for Filter of Config Entities References.
    • 2e7f5f94 - Add Tests for Filter of Config Entities References - fix CS.

    Compare with previous version

  • Tavi Toporjinschi added 160 commits

    added 160 commits

    • 2e7f5f94...b20ec518 - 151 commits from branch project:11.x
    • 9addeb9b - feat: Re-apply patch to 11.x
    • 4699430c - Fix tests.
    • 00af5b55 - Issue 3347343: Rename kernel test file and class names - FilterEntityReferenceTest.
    • b00af2a4 - Fix CSpell fail.
    • 064ed2bd - Fix CSpell fail 2.
    • e5118d11 - Do not limit filters available to Content Entities, use EntityTypeInterface instead.
    • 9741216f - Do not limit filters available to Content Entities, use EntityTypeInterface instead 2.
    • 3dbe61e9 - Add Tests for Filter of Config Entities References.
    • 6de4aeba - Add Tests for Filter of Config Entities References - fix CS.

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 11 commits

    • 156533fe - 1 commit from branch project:11.x
    • 8067de16 - feat: Re-apply patch to 11.x
    • 8d7bbd25 - Fix tests.
    • 5e6509c0 - Issue 3347343: Rename kernel test file and class names - FilterEntityReferenceTest.
    • 01ec6d84 - Fix CSpell fail.
    • 8021ed66 - Fix CSpell fail 2.
    • 6a5c03ba - Do not limit filters available to Content Entities, use EntityTypeInterface instead.
    • f0b7e9c2 - Do not limit filters available to Content Entities, use EntityTypeInterface instead 2.
    • 9b163881 - Add Tests for Filter of Config Entities References.
    • 6f0c254d - Add Tests for Filter of Config Entities References - fix CS.
    • 617519af - Fix PHPStan.

    Compare with previous version

  • added 69 commits

    • 617519af...502c857b - 59 commits from branch project:11.x
    • 0ba3b34e - feat: Re-apply patch to 11.x
    • baf7c4a2 - Fix tests.
    • 9112eb4b - Issue 3347343: Rename kernel test file and class names - FilterEntityReferenceTest.
    • 246dcb48 - Fix CSpell fail.
    • 9192ba62 - Fix CSpell fail 2.
    • 7b15c547 - Do not limit filters available to Content Entities, use EntityTypeInterface instead.
    • 50029f14 - Do not limit filters available to Content Entities, use EntityTypeInterface instead 2.
    • 27689967 - Add Tests for Filter of Config Entities References.
    • 15d687a8 - Add Tests for Filter of Config Entities References - fix CS.
    • f56526d0 - Fix PHPStan.

    Compare with previous version

  • added 11 commits

    • 5aa9704c - 1 commit from branch project:11.x
    • deed88e6 - feat: Re-apply patch to 11.x
    • 9bda798d - Fix tests.
    • 78b8e18e - Issue 3347343: Rename kernel test file and class names - FilterEntityReferenceTest.
    • 1fbaa328 - Fix CSpell fail.
    • 9c90c7b4 - Fix CSpell fail 2.
    • c8ed37f5 - Do not limit filters available to Content Entities, use EntityTypeInterface instead.
    • 2dafbc90 - Do not limit filters available to Content Entities, use EntityTypeInterface instead 2.
    • bb5ee69b - Add Tests for Filter of Config Entities References.
    • e151b1ad - Add Tests for Filter of Config Entities References - fix CS.
    • f167cc8a - Fix PHPStan.

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Tavi Toporjinschi added 124 commits

    added 124 commits

    • 64ed87d3...f1d04f61 - 112 commits from branch project:11.x
    • f1d04f61...bced5806 - 2 earlier commits
    • f75a5fde - Issue 3347343: Rename kernel test file and class names - FilterEntityReferenceTest.
    • 1b229611 - Fix CSpell fail.
    • a2bec811 - Fix CSpell fail 2.
    • e6de2e7e - Do not limit filters available to Content Entities, use EntityTypeInterface instead.
    • 81618a2d - Do not limit filters available to Content Entities, use EntityTypeInterface instead 2.
    • 2b73b2dc - Add Tests for Filter of Config Entities References.
    • 49a9db4e - Add Tests for Filter of Config Entities References - fix CS.
    • 69524a9c - Fix PHPStan.
    • 4f34cadc - Fix CS updates.
    • 416637d9 - Cleam Up.

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 8a183034 - CleanUp Views Filter plugin.

    Compare with previous version

  • added 1 commit

    • 82985d33 - CleanUp Views Filter plugin - Fix CS.

    Compare with previous version

  • added 1 commit

    • c47e4181 - CleanUp Views Filter plugin - Fix CS 2.

    Compare with previous version

  • added 1 commit

    • ccb72b2e - CleanUp Views Filter plugin - Fix CS 3.

    Compare with previous version

  • 793 795 $target_base_table = $target_entity_type->getDataTable() ?: $target_entity_type->getBaseTable();
    794 796 $field_name = $field_storage->getName();
    795 797
    798 if ($target_entity_type instanceof EntityTypeInterface) {
    799 foreach ($table_data as $table_field_name => $table_field_data) {
    800 if (isset($table_field_data['filter']) && $table_field_name != 'delta') {
    801 // Create separate views data to allow use of the entity_reference
  • catch added 1 commit

    added 1 commit

    • c1f1fc15 - Revert change to DefaultSelection handler.

    Compare with previous version

  • added 1 commit

    • 9836df97 - Update Entity reference DefaultSelection plugin - move Form validation to...

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Tavi Toporjinschi added 124 commits

    added 124 commits

    Compare with previous version

  • added 23 commits

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • b6aa6e4e - Correct '#ajax' elements property for DefaultSelection and cleanup...

    Compare with previous version

  • added 1 commit

    • e20d506a - Revert "Correct '#ajax' elements property for DefaultSelection and cleanup...

    Compare with previous version

  • Scott Euser added 1 commit

    added 1 commit

    Compare with previous version

  • Tavi Toporjinschi
    Tavi Toporjinschi @vasike started a thread on an outdated change in commit 5446efe3
  • 453 453 $table_data[$schema_field_name]['entity field'] = $field_name;
    454 454 $first = FALSE;
    455 455 }
    456
    457 // Check if the field has a target entity entity.
    458 $field_storage = $field_definition->getFieldStorageDefinition();
  • Tavi Toporjinschi
    Tavi Toporjinschi @vasike started a thread on an outdated change in commit 5446efe3
  • 453 453 $table_data[$schema_field_name]['entity field'] = $field_name;
    454 454 $first = FALSE;
    455 455 }
    456
    457 // Check if the field has a target entity entity.
    458 $field_storage = $field_definition->getFieldStorageDefinition();
    459 $target_entity_type_id = $field_storage->getSetting('target_type');
    460 if ($target_entity_type_id) {
    461 $target_entity_type = $this->entityTypeManager->getDefinition($target_entity_type_id);
    462 if ($target_entity_type instanceof EntityTypeInterface) {
  • Scott Euser added 1 commit

    added 1 commit

    • 64b89ead - Fix for test failure of MediaLibraryWidgetTest

    Compare with previous version

  • Scott Euser added 1 commit

    added 1 commit

    • 37f5a9f5 - WIP: Sorting out test failures

    Compare with previous version

  • Scott Euser added 1 commit

    added 1 commit

    • afb88bb2 - Fix the views data to only create the '* as a reference' handler for filter,...

    Compare with previous version

  • Scott Euser added 1 commit

    added 1 commit

    • d9ef7806 - Test for base field as a reference: Node 'Authored By'

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading