public function ViewmodepagePatternRepository::findAll in View Mode Page 3.2.x
Same name and namespace in other branches
- 8.3 src/Repository/ViewmodepagePatternRepository.php \Drupal\view_mode_page\Repository\ViewmodepagePatternRepository::findAll()
- 4.0.x src/Repository/ViewmodepagePatternRepository.php \Drupal\view_mode_page\Repository\ViewmodepagePatternRepository::findAll()
Find all patterns.
Return value
\Drupal\view_mode_page\ViewmodepagePatternInterface[] The viewmodepage pattern interface.
File
- src/
Repository/ ViewmodepagePatternRepository.php, line 36
Class
- ViewmodepagePatternRepository
- Class ViewmodepagePatternRepository.
Namespace
Drupal\view_mode_page\RepositoryCode
public function findAll() {
static $patterns;
if (!isset($patterns)) {
$ids = $this->entityTypeManager
->getStorage('view_mode_page_pattern')
->getQuery()
->sort('weight')
->execute();
$patterns = $this->entityTypeManager
->getStorage('view_mode_page_pattern')
->loadMultiple($ids);
}
return $patterns;
}