How to get BundleKey in EntityManager after getting storage of entity? I want to get bundleKey of any entity type after is loading from

$node = \Drupal::entityManager()-&gt;getStorage('node');


After getStorage I am getting bundleKey Value as "type", but how to render that, as it is saying that is a protected value.
Tried to fetch like:

-&gt; $node-&gt;get('bundleKey')-&gt;Value();
-&gt; $node-&gt;getField('bundleKey')-&gt;getValue();
-&gt; $node-&gt;bundleKey;


All above methods i tried to fetch Values but still no luck.

Anyone Knows how to fetch bundleKey.
You can get bundleKey of your entity type by this way:

$type = 'commerce_product';
$bundle_key = \Drupal::entityTypeManager()-&gt;getDefinition($type)-&gt;getKey('bundle');