Get list of available options in a select field of custom content type I created a custom content type called 'slide' that has a custom select field called 'field_category'. I would like to be able to load the available options of 'field_category' into the select field of a block form.

I'm currently attempting to follow the instructions of an answer to a similar question here but I'm still having trouble. 

I'm grabbing the content type definitions like so 

$definitions = \Drupal::service('entity_field.manager')-&gt;getFieldDefinitions('node', 'slide');


However when I spit out 

print_r($definitions-&gt;getFieldDefinition('field_category'))


I can't actually find any of the options to grab. Is there a way to grab the available options of a field of a custom content type programmatically?
$definitions = \Drupal::service('entity_field.manager')-&gt;getFieldDefinitions('node', 'slide');
$definition = $definitions['field_category'];
$settings = $definition-&gt;getSettings();
$allowed_values = $settings['allowed_values'];