/**
  * Gets enabled assignment methods.
  *
  * @return array
  *   An array of enabled assignment methods, sorted by weight.
  */
 public function getEnabledAssigners() {
   $enabled = $this->currentBundle->getEnabledAssignments();
   $weights = $this->currentBundle->getAssignmentWeights();
   foreach ($enabled as $key => $value) {
     $enabled[$key] = $weights[$key];
   }
   asort($enabled);
   return $enabled;
 }
 /**
  * Enables a specified assignment method.
  *
  * @param string $method_id
  *   The ID of an assignment method.
  * @param bool $exclusive
  *   (optional) Whether to set the method as the only enabled method.
  *   Defaults to TRUE.
  */
 protected function enableAssignmentMethod($method_id, $exclusive = TRUE)
 {
     if ($exclusive) {
         $this->bundle->setEnabledAssignments([$method_id]);
     } else {
         $enabled = array_keys($this->bundle->getEnabledAssignments());
         $enabled[] = $method_id;
         $this->bundle->setEnabledAssignments($enabled);
     }
 }