Skip to content
Snippets Groups Projects

Fixed error: Call to private method in entity_usage_form_alter().

Merged Silvi Sanghavi requested to merge issue/entity_usage-3260251:8.x-2.x into 8.x-2.x
2 unresolved threads

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
85 85 */
86 86 function entity_usage_form_alter(&$form, FormStateInterface $form_state, $form_id) {
87 87 $form_object = $form_state->getFormObject();
88 if (!method_exists($form_object, 'getEntity')) {
88 if (!$form_object instanceof \Drupal\Core\Entity\EntityFormInterface) {
  • Dhruv Mittal added 38 commits

    added 38 commits

    Compare with previous version

  • Dhruv Mittal added 1 commit

    added 1 commit

    Compare with previous version

  • 107 108 if (!in_array($entity_type_id, $edit_entity_types) && !in_array($entity_type_id, $delete_entity_types)) {
    108 109 return;
    109 110 }
    110 111 $is_edit_form = method_exists($form_object, 'getOperation') && $form_object->getOperation() === 'edit' && in_array($entity_type_id, $edit_entity_types);
  • Dhruv Mittal added 1 commit

    added 1 commit

    Compare with previous version

  • merged

  • Please register or sign in to reply
    Loading