Problem/Motivation

The MyrestMetatagForm.php currently depends on custom classes MyentityNode, MyentityProduct, and MyentityTerm, which are not part of the module or Drupal core. This prevents the module from being portable and causes crashes if the myentity module is missing.

Proposed resolution

  • Remove use statements for MyentityNode, MyentityProduct, and MyentityTerm.
  • Refactor validateForm to use the standard EntityTypeManagerInterface for entity loading.
  • Ensure the entity lookup logic is generic and supports standard entity types (node, taxonomy_term, etc.) without hardcoding specific classes.

Remaining tasks

Apply refactoring and test with standard Drupal entities.

User interface changes

None.

API changes

Removal of dependency on myentity module classes.

Data model changes

None.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sergeydruua created an issue. See original summary.

  • sergeydruua committed b8a40f9e on 1.0.x
    Issue #3572772: Refactor MyrestMetatagForm to remove custom entity...
    
sergeydruua’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

sergeydruua’s picture

Status: Fixed » Closed (fixed)