Skip to content
Snippets Groups Projects

Allow to drill down nested paragraphs.

Closed Pieter Frenssen requested to merge issue/ps-3497927:3497927-allow-discovering-where into 1.x
3 files
+ 160
3
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -3,6 +3,7 @@
@@ -3,6 +3,7 @@
namespace Drupal\ps\Controller;
namespace Drupal\ps\Controller;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Controller\ControllerBase;
 
use Drupal\paragraphs\ParagraphInterface;
use Drupal\ps\ParagraphsStats;
use Drupal\ps\ParagraphsStats;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Request;
@@ -52,6 +53,13 @@ class PsController extends ControllerBase {
@@ -52,6 +53,13 @@ class PsController extends ControllerBase {
return $this->paragraphsStats->showUtilizationDrillDown($contentType, $paragraph, $bundle);
return $this->paragraphsStats->showUtilizationDrillDown($contentType, $paragraph, $bundle);
}
}
 
/**
 
* Outputs a report indicating where the given paragraph is used.
 
*/
 
public function showParagraphUsage(ParagraphInterface $paragraph) {
 
return $this->paragraphsStats->showParagraphUsage($paragraph);
 
}
 
/**
/**
* Collects and stores paragraph fields usage data.
* Collects and stores paragraph fields usage data.
*/
*/
Loading