ProductAttributeValueStorage.php in Commerce Core 8.2
File
modules/product/src/ProductAttributeValueStorage.php
View source
<?php
namespace Drupal\commerce_product;
use Drupal\commerce\CommerceContentEntityStorage;
class ProductAttributeValueStorage extends CommerceContentEntityStorage implements ProductAttributeValueStorageInterface {
public function loadMultipleByAttribute($attribute_id) {
$entity_query = $this
->getQuery();
$entity_query
->accessCheck(FALSE);
$entity_query
->condition('attribute', $attribute_id);
$entity_query
->sort('weight');
$entity_query
->sort('name');
$result = $entity_query
->execute();
return $result ? $this
->loadMultiple($result) : [];
}
}