Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TYPO3 10.4 Compatibility #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Classes/Controller/ItemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

use TYPO3\CMS\Extbase\Annotation\Inject;

/**
*
* @package owl_slider
Expand All @@ -37,8 +39,8 @@ class ItemController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
/**
* itemRepository
*
* @Inject
* @var \Comsolit\OwlSlider\Domain\Repository\ItemRepository
* @inject
*/
protected $itemRepository;

Expand Down
29 changes: 15 additions & 14 deletions Classes/Domain/Model/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/

use TYPO3\CMS\Extbase\Annotation as Extbase;

/**
*
* @package owl_slider
Expand All @@ -37,37 +39,36 @@ class Item extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
/**
* Item name
*
* @var \string
* @validate NotEmpty
* @var string
* @Extbase\Validate("NotEmpty")
*/
protected $itemname;

/**
* Item image
*
* @var \string
* @validate NotEmpty
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
*/
protected $itemimage;

/**
* Item link
*
* @var \string
* @var string
*/
protected $itemlink;

/**
* Item content
*
* @var \string
* @var string
*/
protected $itemcontent;

/**
* Returns the itemname
*
* @return \string $itemname
* @return string $itemname
*/
public function getItemname()
{
Expand All @@ -77,7 +78,7 @@ public function getItemname()
/**
* Sets the itemname
*
* @param \string $itemname
* @param string $itemname
* @return void
*/
public function setItemname($itemname)
Expand All @@ -88,7 +89,7 @@ public function setItemname($itemname)
/**
* Returns the itemimage
*
* @return \string $itemimage
* @return string $itemimage
*/
public function getItemimage()
{
Expand All @@ -98,7 +99,7 @@ public function getItemimage()
/**
* Sets the itemimage
*
* @param \string $itemimage
* @param string $itemimage
* @return void
*/
public function setItemimage($itemimage)
Expand All @@ -109,7 +110,7 @@ public function setItemimage($itemimage)
/**
* Returns the itemlink
*
* @return \string itemlink
* @return string itemlink
*/
public function getItemlink()
{
Expand All @@ -119,7 +120,7 @@ public function getItemlink()
/**
* Sets the itemlink
*
* @param \string $itemlink
* @param string $itemlink
* @return void
*/
public function setItemlink($itemlink)
Expand All @@ -130,7 +131,7 @@ public function setItemlink($itemlink)
/**
* Returns the itemcontent
*
* @return \string $itemcontent
* @return string $itemcontent
*/
public function getItemcontent()
{
Expand All @@ -140,7 +141,7 @@ public function getItemcontent()
/**
* Sets the itemcontent
*
* @param \string $itemcontent
* @param string $itemcontent
* @return void
*/
public function setItemcontent($itemcontent)
Expand Down
13 changes: 9 additions & 4 deletions Classes/PHP/tx_owlslider_addFieldsToFlexForm.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?php

use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Utility\RootlineUtility;

class tx_owlslider_addFieldsToFlexForm
{
/**
Expand Down Expand Up @@ -38,11 +41,13 @@ function addFields($config)
*/
function loadTS($pageUid)
{
$sysPageObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Frontend\Page\PageRepository');
$rootLine = $sysPageObj->getRootLine($pageUid);
$TSObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Core\TypoScript\ExtendedTemplateService');
$sysPageObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(TYPO3\CMS\Core\Domain\Repository\PageRepository::class);
$rootlineUtility = GeneralUtility::makeInstance(RootlineUtility::class, $pageUid);
$rootLine = $rootlineUtility->get();

$TSObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\TypoScript\ExtendedTemplateService::class);
$TSObj->tt_track = 0;
$TSObj->init();
// $TSObj->init();
$TSObj->runThroughTemplates($rootLine);
$TSObj->generateConfig();
return $TSObj->setup;
Expand Down
Loading