You are here

public function FeaturesBundle::getAssignmentWeights in Features 8.3

Same name and namespace in other branches
  1. 8.4 src/Entity/FeaturesBundle.php \Drupal\features\Entity\FeaturesBundle::getAssignmentWeights()

Gets the weights of the assignment methods.

Return value

array An array keyed by assignment method_id with a numeric weight.

Overrides FeaturesBundleInterface::getAssignmentWeights

See also

\Drupal\features\FeaturesBundleInterface::setAssignmentWeights()

File

src/Entity/FeaturesBundle.php, line 239

Class

FeaturesBundle
Defines a features bundle.

Namespace

Drupal\features\Entity

Code

public function getAssignmentWeights() {
  $list = [];
  foreach ($this->assignments as $method_id => $method) {
    $list[$method_id] = $method['weight'];
  }
  return $list;
}