I came upon a scenario where I wanted to delete the "private" field permission type. This would a nice feature to support.

CommentFileSizeAuthor
#3 alter_definitions-2900134-1.patch1.32 KBibustos

Comments

ibustos created an issue. See original summary.

ibustos’s picture

Title: Alter other modules to alter existing plugin definitions » Allow other modules to alter existing plugin definitions
ibustos’s picture

StatusFileSize
new1.32 KB

Attached patch.

ibustos’s picture

Status: Active » Needs review
jhedstrom’s picture

Status: Needs review » Needs work

Good idea! Since these are already plugins though, we just need to add a call set our desired alter hook in our plugin manager class (\Drupal\field_permissions\Plugin\FieldPermissionType\Manager):

So in the __construct() method something like:

  $this->alterInfo('field_permissions_types')

This would make the alter hook hook_field_permissions_types_alter().

  • jhedstrom committed 9dd01cc on 8.x-1.x authored by ibustos
    Issue #2900134 by ibustos: Allow other modules to alter existing plugin...
jhedstrom’s picture

Status: Needs work » Fixed

Disregard my above comment, I completely missed the second part of the patch where you had indeed done as I suggested already :)

Committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.