mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
NEW Use injector for creating SSViewer
This commit is contained in:
parent
4700e5e159
commit
1cf8a67f21
@ -450,7 +450,7 @@ HTML;
|
|||||||
SSViewer::get_templates_by_class(static::class, "", "SilverStripe\\Control\\Controller")
|
SSViewer::get_templates_by_class(static::class, "", "SilverStripe\\Control\\Controller")
|
||||||
);
|
);
|
||||||
|
|
||||||
return new SSViewer($templates);
|
return SSViewer::create($templates);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -816,7 +816,7 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
|||||||
public function Breadcrumbs($maxDepth = 20, $unlinked = false, $stopAtPageType = false, $showHidden = false)
|
public function Breadcrumbs($maxDepth = 20, $unlinked = false, $stopAtPageType = false, $showHidden = false)
|
||||||
{
|
{
|
||||||
$pages = $this->getBreadcrumbItems($maxDepth, $stopAtPageType, $showHidden);
|
$pages = $this->getBreadcrumbItems($maxDepth, $stopAtPageType, $showHidden);
|
||||||
$template = new SSViewer('BreadcrumbsTemplate');
|
$template = SSViewer::create('BreadcrumbsTemplate');
|
||||||
return $template->process($this->customise(new ArrayData(array(
|
return $template->process($this->customise(new ArrayData(array(
|
||||||
"Pages" => $pages,
|
"Pages" => $pages,
|
||||||
"Unlinked" => $unlinked
|
"Unlinked" => $unlinked
|
||||||
|
@ -65,7 +65,7 @@ class SiteTreeFileExtension extends DataExtension
|
|||||||
*/
|
*/
|
||||||
public function BackLinkHTMLList()
|
public function BackLinkHTMLList()
|
||||||
{
|
{
|
||||||
$viewer = new SSViewer(["type" => "Includes", self::class . "_description"]);
|
$viewer = SSViewer::create(["type" => "Includes", self::class . "_description"]);
|
||||||
|
|
||||||
return $viewer->process($this->owner);
|
return $viewer->process($this->owner);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user