makes $page optional
This commit is contained in:
parent
f58b75700c
commit
d2f9c6ae81
|
@ -20,8 +20,9 @@ class HeaderImageViewHelper extends AbstractHelper
|
|||
* @param SitePageRepresentation
|
||||
* @return string media url
|
||||
*/
|
||||
public function getImage($page)
|
||||
public function getImage($page = null)
|
||||
{
|
||||
if ($page) {
|
||||
foreach ($page->blocks() as $block) {
|
||||
if ($block->layout() === 'headerImage') {
|
||||
$attachments = $block->attachments();
|
||||
|
@ -31,6 +32,7 @@ class HeaderImageViewHelper extends AbstractHelper
|
|||
#}
|
||||
}
|
||||
}
|
||||
}
|
||||
$site = $this->currentSite();
|
||||
return $this->getView()->getHelperPluginManager()->get('archiveSiteMeta')->getSiteImage($site);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue