Skip to content
Snippets Groups Projects

Resolve #3519842 "Support oop hooks"

2 unresolved threads

Closes #3519842

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
47 * {@inheritdoc}
43 * Constructs a EntityHooks object.
44 *
45 * @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory
46 * The config factory service.
47 * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
48 * The entity type manager service.
49 * @param \Drupal\Core\Session\AccountInterface $currentUser
50 * The current user.
48 51 */
49 public static function create(ContainerInterface $container): EntityTypeInfo {
50 return new static(
51 $container->get('current_user'),
52 $container->get('config.factory')
53 );
52 public function __construct(ConfigFactoryInterface $configFactory, EntityTypeManagerInterface $entityTypeManager, AccountInterface $currentUser) {
  • Sven Decabooter left review comments

    left review comments

  • 68 foreach ($entityTypes as $entityTypeId => $entityType) {
    69 if (in_array($entityTypeId, $enabledEntityTypes, TRUE)) {
    70 $entityType->setLinkTemplate('entity-logger', "/entity_logger/$entityTypeId/{{$entityTypeId}}");
    70 71 }
    71 72 }
    72 73 }
    73 74 }
    74 75
    75 76 /**
    76 * Add entity operation on entities that supports it.
    77 * Implements hook_entity_predelete().
    78 *
    79 * @param \Drupal\Core\Entity\EntityInterface $entity
    80 * The given entity.
    81 *
    82 * @return void
  • Sven Decabooter left review comments

    left review comments

  • Please register or sign in to reply
    Loading