Skip to content
Snippets Groups Projects

Issue #2971390: Make exposure of translation meta fields conditional

Closes #2971390

Merge request reports

Members who can merge are allowed to add commits.
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
  • 2
    3 namespace Drupal\entity_test;
    4
    5 use Drupal\Core\Entity\EntityInterface;
    6 use Drupal\content_translation\ContentTranslationHandler;
    7 use Drupal\Core\Form\FormStateInterface;
    8
    9 /**
    10 * Defines the translation handler for entity test entities.
    11 */
    12 class EntityTestTranslationHandler extends ContentTranslationHandler {
    13
    14 /**
    15 * {@inheritdoc}
    16 */
    17 public function entityFormEntityBuild($entity_type, EntityInterface $entity, array $form, FormStateInterface $form_state) {
  • 51 }
    52 }
    53
    54 // Assert there is no content translation meta data field.
    55 $this->assertSession()->fieldNotExists("content_translation[$field_name]");
    56 }
    57
    58 return $edit;
    59 }
    60
    61 /**
    62 * Returns whether a given field name exists in the field storage definitions.
    63 *
    64 * @see \Drupal\content_translation\ContentTranslationHandler::checkFieldStorageDefinitionTranslatability
    65 */
    66 protected function hasMetadataField($field_name) {
  • 2
    3 namespace Drupal\Tests\content_translation\Functional;
    4
    5 use Drupal\user\EntityOwnerInterface;
    6
    7 /**
    8 * Provides methods to assert content translation meta data fields.
    9 *
    10 * Can be used by test classes that extend \Drupal\Tests\BrowserTestBase.
    11 */
    12 trait ContentTranslationMetadataTrait {
    13
    14 /**
    15 * Gets the metadata field value.
    16 */
    17 protected function getMetadataValueAndAssertNoField($field_name, $field_value) {
  • Stephen Mustgrave
  • Kalle Vuorjoki added 853 commits

    added 853 commits

    • e244486b...c5638bc1 - 843 earlier commits
    • ec9db203 - Issue #2885413 by quietone, smustgrave, eugene.brit, gambry, mikelutz,...
    • 69727d98 - Issue #3400334 by mstrelan, quietone, smustgrave: Add declare(strict_types=1) to all test modules
    • 1cdc2184 - Issue #3469819 by catch: Split up jsonapi CommentTest
    • 8cf56257 - Issue #3469823 by catch: TaxonomyTestTrait methods should be protected
    • 8fa9c5fe - Issue #3469709 by catch, pooja_sharma, smustgrave, quietone: Speed up UpdateContribTest
    • 9a83962b - Issue #3469824 by catch, smustgrave: CommentTestBase/CommentTestTrait methods should be protected
    • 7035d910 - Issue #3385838 by pooja_sharma, longwave, joachim, smustgrave:...
    • f8108760 - Issue #3469583 by catch, pooja_sharma: Speed up UpdateSemverTestSecurityCoverageTest
    • 26166c5f - Revert "Issue #2983612 by daniel.bosen, randalv, swatichouhan012, alexpott,...
    • 3d03e13e - Issue #3465602 by catch, quietone, smustgrave: Order tests by number of public...

    Compare with previous version

  • Kalle Vuorjoki added 854 commits

    added 854 commits

    Compare with previous version

  • added 1 commit

    • 26cdb78e - Issue 2971390: Coding standard issues

    Compare with previous version

  • added 1 commit

    • 18f4367a - Issue 2971390: Coding standard issues

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Kalle Vuorjoki added 144 commits

    added 144 commits

    Compare with previous version

  • added 1 commit

    • 5f150377 - Issue 2971390: Add return type

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 573f8780 - Issue 3479319: Fix PHPStan issues

    Compare with previous version

  • added 1 commit

    • baba778f - Issue 3479319: Fix PHPStan issues

    Compare with previous version

  • added 1 commit

    • 043b4008 - Issue 3479319: Fix PHPStan issues

    Compare with previous version

  • Kalle Vuorjoki added 4 commits

    added 4 commits

    Compare with previous version

  • added 115 commits

    Compare with previous version

  • added 241 commits

    Compare with previous version

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