Skip to content
Permalink
Browse files

NEW Use injector for creating SSViewer

  • Loading branch information
robbieaverill authored and sminnee committed Jul 13, 2017
1 parent 4700e5e commit 1cf8a67f21563c99044bccd78af6c7f02b1ebb81
Showing with 3 additions and 3 deletions.
  1. +1 −1 code/Controllers/ContentController.php
  2. +1 −1 code/Model/SiteTree.php
  3. +1 −1 code/Model/SiteTreeFileExtension.php
@@ -450,7 +450,7 @@ public function getViewer($action)
SSViewer::get_templates_by_class(static::class, "", "SilverStripe\\Control\\Controller")
);
return new SSViewer($templates);
return SSViewer::create($templates);
}
@@ -816,7 +816,7 @@ public function duplicateAsChild($id)
public function Breadcrumbs($maxDepth = 20, $unlinked = false, $stopAtPageType = false, $showHidden = false)
{
$pages = $this->getBreadcrumbItems($maxDepth, $stopAtPageType, $showHidden);
$template = new SSViewer('BreadcrumbsTemplate');
$template = SSViewer::create('BreadcrumbsTemplate');
return $template->process($this->customise(new ArrayData(array(
"Pages" => $pages,
"Unlinked" => $unlinked
@@ -65,7 +65,7 @@ public function updateCMSFields(FieldList $fields)
*/
public function BackLinkHTMLList()
{
$viewer = new SSViewer(["type" => "Includes", self::class . "_description"]);
$viewer = SSViewer::create(["type" => "Includes", self::class . "_description"]);
return $viewer->process($this->owner);
}

0 comments on commit 1cf8a67

Please sign in to comment.
You can’t perform that action at this time.