You are here

public function MarkdownBenchmarkAverages::getFallbackBenchmark in Markdown 3.0.x

Retrieves a fallback benchmark, creating one if necessary.

Return value

\Drupal\markdown\MarkdownBenchmark A fallback benchmark.

1 call to MarkdownBenchmarkAverages::getFallbackBenchmark()
MarkdownBenchmarkAverages::getLastBenchmark in src/MarkdownBenchmarkAverages.php
Retrieves the last benchmark of a certain type.

File

src/MarkdownBenchmarkAverages.php, line 258

Class

MarkdownBenchmarkAverages
Class MarkdownBenchmarkAverages.

Namespace

Drupal\markdown

Code

public function getFallbackBenchmark() {
  if ($this->fallbackBenchmark === NULL) {
    $this->fallbackBenchmark = MarkdownBenchmark::create('fallback', NULL, NULL, $this
      ->t('N/A'));
  }
  return $this->fallbackBenchmark;
}