Skip to content
Snippets Groups Projects

[FEATURE] Added Site to the Event

Merged Matthias Adrowski requested to merge feature_add-site-to-event into master
All threads resolved!
2 files
+ 44
2
Compare changes
  • Side-by-side
  • Inline
Files
2
<?php
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
namespace SGalinski\SgSeo\Events;
use TYPO3\CMS\Core\Site\Entity\Site;
/**
* Class AccessPageListEvent
*
@@ -18,15 +44,22 @@ class AccessPageListEvent {
*/
protected $sysLanguageUid = 0;
/**
* @var Site|null
*/
protected $site = null;
/**
* AccessPageListEvent constructor.
*
* @param array $pageList
* @param int $sysLanguageUid
* @param Site $site
*/
public function __construct(array $pageList, int $sysLanguageUid) {
public function __construct(array $pageList, int $sysLanguageUid, Site $site) {
$this->pageList = $pageList;
$this->sysLanguageUid = $sysLanguageUid;
$this->site = $site;
}
/**
@@ -49,4 +82,13 @@ class AccessPageListEvent {
public function setPageList(array $pageList): void {
$this->pageList = $pageList;
}
/**
* Returns the Site from Event creating Sitemap Generator
*
* @return Site
*/
public function getSite(): Site {
return $this->site;
}
}
Loading