/**
  * {@inheritdoc}
  */
 public function getDefinitions($sorted = TRUE)
 {
     $definitions = parent::getDefinitions(FALSE);
     if ($sorted) {
         $groups = [];
         foreach ($definitions as $plugin_id => $definition) {
             $key = !empty($definition['groups']) ? implode(':', array_keys($definition['groups'])) : '_default';
             $groups[$key][$plugin_id] = $definition;
         }
         ksort($groups);
         $definitions = [];
         foreach ($groups as $settings) {
             uasort($settings, [$this, 'sort']);
             $definitions = array_merge($definitions, $settings);
         }
     }
     return $definitions;
 }
 /**
  * Constructs a new \Drupal\materialize\Plugin\ProcessManager object.
  *
  * @param \Drupal\materialize\Theme $theme
  *   The theme to use for discovery.
  */
 public function __construct(Theme $theme)
 {
     parent::__construct($theme, 'Plugin/Process', 'Drupal\\materialize\\Plugin\\Process\\ProcessInterface', 'Drupal\\materialize\\Annotation\\MaterializeProcess');
     $this->setCacheBackend(\Drupal::cache('discovery'), 'theme:' . $theme->getName() . ':process', $this->getCacheTags());
 }