public function ConfigPagesLoaderService::load in Config Pages 8.2
Same name and namespace in other branches
- 8.3 src/ConfigPagesLoaderService.php \Drupal\config_pages\ConfigPagesLoaderService::load()
Loads config page entity by type and context.
Parameters
string $type: Config page type to load.
string $context: Context which should be used to load entity.
Return value
null|\Drupal\config_pages\Entity\ConfigPages Loaded CP object.
Overrides ConfigPagesLoaderServiceInterface::load
2 calls to ConfigPagesLoaderService::load()
- ConfigPagesLoaderService::getFieldView in src/
ConfigPagesLoaderService.php - Get render array of CP.
- ConfigPagesLoaderService::getValue in src/
ConfigPagesLoaderService.php - Get value from CP.
File
- src/
ConfigPagesLoaderService.php, line 31
Class
- ConfigPagesLoaderService
- Class used as loader for ConfigPages.
Namespace
Drupal\config_pagesCode
public function load($type, $context = NULL) {
$config_page = !empty($type) ? ConfigPages::config($type, $context) : NULL;
return $config_page;
}