You are here

public function SimpleSitemap::getType in Simple XML sitemap 4.x

Overrides SimpleSitemapInterface::getType

File

src/Entity/SimpleSitemap.php, line 107

Class

SimpleSitemap
Defines the simple_sitemap entity.

Namespace

Drupal\simple_sitemap\Entity

Code

public function getType() : SimpleSitemapTypeInterface {
  if ($this->sitemapType === NULL) {
    $this->sitemapType = \Drupal::entityTypeManager()
      ->getStorage('simple_sitemap_type')
      ->load($this
      ->get('type'));
  }
  return $this->sitemapType;
}