public function XmlSitemapLinkStorage::loadMultiple in XML sitemap 8
Same name and namespace in other branches
- 2.x src/XmlSitemapLinkStorage.php \Drupal\xmlsitemap\XmlSitemapLinkStorage::loadMultiple()
Load sitemap links from the database.
Parameters
array $conditions: An array of conditions on the {xmlsitemap} table in the form 'field' => $value.
Return value
array An array of sitemap link arrays.
Overrides XmlSitemapLinkStorageInterface::loadMultiple
1 call to XmlSitemapLinkStorage::loadMultiple()
- XmlSitemapLinkStorage::load in src/
XmlSitemapLinkStorage.php - Load a specific sitemap link from the database.
File
- src/
XmlSitemapLinkStorage.php, line 329
Class
- XmlSitemapLinkStorage
- XmlSitemap link storage service class.
Namespace
Drupal\xmlsitemapCode
public function loadMultiple(array $conditions = []) {
$query = $this->connection
->select('xmlsitemap');
$query
->fields('xmlsitemap');
foreach ($conditions as $field => $value) {
$operator = is_array($value) ? 'IN' : '=';
$query
->condition($field, $value, $operator);
}
$links = $query
->execute()
->fetchAll(\PDO::FETCH_ASSOC);
return $links;
}