You can execute the php-cliphp-cli code below to get a list of all the 186 referenceBlock~200 referenceBlock
. Make sure the path to your Magento 2Magento 2 root folder is correct. You can also change the "instruction"instruction
variable to list "block"block
, "container"container
and "referenceContainer"referenceContainer
.
<?php
//$instruction = "container";
//$instruction = "referenceContainer";
$instruction = "block";
//$instruction = "referenceBlock";
$path = '/var/www/html/magento2/vendor/magento';
$command = 'cd '.$path.' && egrep -r -i --include \*.xml "<'.$instruction.'".*?"name=" *';
exec($command, $output);
$container_max_length = 1;
$pattern = '/(.*?):.*<'.$instruction.'.*name="(.*?)".*/';
foreach ($output as $subject) {
preg_match($pattern, $subject, $matches);
$containers[$matches[2]][] = $matches[1];
if (strlen($matches[2]) > $container_max_length) $container_max_length = strlen($matches[2]);
}
$n=1;
ksort($containers);
foreach ($containers as $k => $v) {
printf("%6s", "$n. ");
printf("%-".$container_max_length."s".$v[0]."\n", $k);
$i=1;
while (isset($v[$i])) {
printf(" %-".$container_max_length."s".$v[$i]."\n", "");
$i++;
}
$n++;
}
?>