-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from pdir/1.3.1
1.3.1
- Loading branch information
Showing
3 changed files
with
35 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* Animated timeline bundle for Contao Open Source CMS | ||
* | ||
* Copyright (c) 2024 pdir / digital agentur // pdir GmbH | ||
* | ||
* @package animated-timeline-bundle | ||
* @link https://pdir.de | ||
* @license LGPL-3.0+ | ||
* @author Philipp Seibt <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Pdir\AnimatedTimelineBundle\EventListener\DataContainer; | ||
|
||
use Contao\CoreBundle\DependencyInjection\Attribute\AsCallback; | ||
|
@@ -10,9 +26,10 @@ class TimelineElementListeners | |
#[AsCallback('tl_content', 'fields.multiSRC.load')] | ||
public function setMultiSRCFlags(mixed $varValue, DataContainer $dc): mixed | ||
{ | ||
if ($dc->activeRecord && $dc->activeRecord->type === 'timelineSliderElement') { | ||
if ($dc->activeRecord && 'timelineSliderElement' === $dc->activeRecord->type) { | ||
$GLOBALS['TL_DCA'][$dc->table]['fields'][$dc->field]['eval']['isGallery'] = true; | ||
} | ||
|
||
return $varValue; | ||
} | ||
} |