Loads updated and customized menu links for specific router paths.
Note that this is a low-level method and it doesn't return fully populated menu link entities. (e.g. no fields are attached)
array $router_paths: An array of router paths.
array An array of menu link objects indexed by their ids.
public function loadUpdatedCustomized(array $router_paths) {
$query = parent::buildQuery(NULL);
$query
->condition(db_or()
->condition('updated', 1)
->condition(db_and()
->condition('router_path', $router_paths, 'NOT IN')
->condition('external', 0)
->condition('customized', 1)));
$query_result = $query
->execute();
if (!empty($this->entityInfo['class'])) {
// We provide the necessary arguments for PDO to create objects of the
// specified entity class.
// @see Drupal\Core\Entity\EntityInterface::__construct()
$query_result
->setFetchMode(\PDO::FETCH_CLASS, $this->entityInfo['class'], array(
array(),
$this->entityType,
));
}
return $query_result
->fetchAllAssoc($this->idKey);
}