CorrespondingReferenceStorage.php in Corresponding Entity References 8.4
File
src/CorrespondingReferenceStorage.php
View source
<?php
namespace Drupal\cer;
use Drupal\Core\Config\Entity\ConfigEntityStorage;
use Drupal\Core\Entity\EntityInterface;
class CorrespondingReferenceStorage extends ConfigEntityStorage implements CorrespondingReferenceStorageInterface {
public function loadValid(EntityInterface $entity) {
$query = $this
->getQuery()
->condition('enabled', 1);
$result = $query
->execute();
if (empty($result)) {
return [];
}
return $this
->loadMultiple($result);
}
}