class ViewmodepagePatternRepository in View Mode Page 4.0.x
Same name and namespace in other branches
- 8.3 src/Repository/ViewmodepagePatternRepository.php \Drupal\view_mode_page\Repository\ViewmodepagePatternRepository
- 3.2.x src/Repository/ViewmodepagePatternRepository.php \Drupal\view_mode_page\Repository\ViewmodepagePatternRepository
Class ViewmodepagePatternRepository.
@package Drupal\view_mode_page\Repository
Hierarchy
- class \Drupal\view_mode_page\Repository\ViewmodepagePatternRepository
Expanded class hierarchy of ViewmodepagePatternRepository
1 file declares its use of ViewmodepagePatternRepository
- DynamicPathProcessor.php in src/
PathProcessor/ DynamicPathProcessor.php
1 string reference to 'ViewmodepagePatternRepository'
1 service uses ViewmodepagePatternRepository
File
- src/
Repository/ ViewmodepagePatternRepository.php, line 12
Namespace
Drupal\view_mode_page\RepositoryView source
class ViewmodepagePatternRepository {
/**
* The entity type manager interface.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* ViewmodepagePatternRepository constructor.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager interface.
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager) {
$this->entityTypeManager = $entity_type_manager;
}
/**
* Find all patterns.
*
* @return \Drupal\view_mode_page\ViewmodepagePatternInterface[]
* The viewmodepage pattern interface.
*/
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ViewmodepagePatternRepository:: |
protected | property | The entity type manager interface. | |
ViewmodepagePatternRepository:: |
public | function | Find all patterns. | |
ViewmodepagePatternRepository:: |
public | function | ViewmodepagePatternRepository constructor. |