You are here

public function ConfigPagesLoaderService::load in Config Pages 8.3

Same name and namespace in other branches
  1. 8.2 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 ConfigPagesLoaderService.

Namespace

Drupal\config_pages

Code

public function load($type, $context = NULL) {
  $config_page = !empty($type) ? ConfigPages::config($type, $context) : NULL;
  return $config_page;
}