-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compatibility with Codefog News Categories bundle
- Loading branch information
Showing
5 changed files
with
68 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
Check failure on line 1 in src/Module/NewsCategoriesModule.php GitHub Actions / PHPStan
|
||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* social feed bundle for Contao Open Source CMS | ||
* | ||
* Copyright (c) 2023 pdir / digital agentur // pdir GmbH | ||
* | ||
* @package social-feed-bundle | ||
* @link https://github.com/pdir/social-feed-bundle | ||
* @license http://www.gnu.org/licences/lgpl-3.0.html LGPL | ||
* @author Mathias Arzberger <[email protected]> | ||
* @author Philipp Seibt <[email protected]> | ||
* @author pdir GmbH <https://pdir.de> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Pdir\SocialFeedBundle\Module; | ||
|
||
use Contao\LayoutModel; | ||
use Codefog\NewsCategoriesBundle\FrontendModule\NewsListModule; | ||
use Pdir\SocialFeedBundle\Module\ModuleCustomNewslist; | ||
|
||
class NewsCategoriesModule extends NewsListModule | ||
{ | ||
/** | ||
* Template. | ||
* | ||
* @var string | ||
*/ | ||
protected $strTemplate = 'mod_newslist'; | ||
|
||
protected function compile(): void | ||
{ | ||
parent::compile(); | ||
|
||
$this->Template->sfMasonry = $this->pdir_sf_enableMasonry; | ||
$this->Template->sfColumns = ' '.$this->pdir_sf_columns; | ||
|
||
$layout = LayoutModel::findByPk($GLOBALS['objPage']->layout); | ||
|
||
if (null !== $layout->scripts && strpos($layout->scripts, 'lazyload')) { | ||
$this->Template->lazyload = true; | ||
} else { | ||
$this->Template->lazyload = false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters