You are here

public function SimpleSitemapDisplayExtender::hasRequiredArguments in Simple XML sitemap 4.x

Same name and namespace in other branches
  1. 8.3 modules/simple_sitemap_views/src/Plugin/views/display_extender/SimpleSitemapDisplayExtender.php \Drupal\simple_sitemap_views\Plugin\views\display_extender\SimpleSitemapDisplayExtender::hasRequiredArguments()

Determines if the view path contains required arguments.

Return value

bool TRUE if the path contains required arguments, FALSE if not.

1 call to SimpleSitemapDisplayExtender::hasRequiredArguments()
SimpleSitemapDisplayExtender::buildOptionsForm in modules/simple_sitemap_views/src/Plugin/views/display_extender/SimpleSitemapDisplayExtender.php
Provide a form to edit options for this plugin.

File

modules/simple_sitemap_views/src/Plugin/views/display_extender/SimpleSitemapDisplayExtender.php, line 344

Class

SimpleSitemapDisplayExtender
Simple XML Sitemap display extender plugin.

Namespace

Drupal\simple_sitemap_views\Plugin\views\display_extender

Code

public function hasRequiredArguments() : bool {
  $bits = explode('/', $this->displayHandler
    ->getPath());
  foreach ($bits as $bit) {
    if ($bit === '%' || strpos($bit, '%') === 0) {
      return TRUE;
    }
  }
  return FALSE;
}