Last active
July 23, 2023 03:14
-
-
Save chx/a94ea6fed723d6f5352e4e8ff9eb1d41 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# put this file in ~/.config/psysh/ | |
if (class_exists('Drupal')) { | |
foreach (\Drupal::entityTypeManager()->getDefinitions() as $definition) { | |
$class = $definition->getClass(); | |
$parts = explode('\\', $class); | |
class_alias($class, end($parts)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment