You are here

public function SimpleSitemapStorage::loadByProperties in Simple XML sitemap 4.x

Load entities by their property values.

Parameters

array $values: An associative array where the keys are the property names and the values are the values those properties must have.

Return value

\Drupal\Core\Entity\EntityInterface[] An array of entity objects indexed by their ids.

Overrides EntityStorageBase::loadByProperties

File

src/Entity/SimpleSitemapStorage.php, line 107

Class

SimpleSitemapStorage

Namespace

Drupal\simple_sitemap\Entity

Code

public function loadByProperties(array $values = []) : array {
  $sitemaps = parent::loadByProperties($values);
  uasort($sitemaps, [
    SimpleSitemap::class,
    'sort',
  ]);
  return $sitemaps;
}