Skip to content

Commit

Permalink
Version 13.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bihor committed Apr 2, 2024
1 parent 1e6df3c commit 17ef646
Show file tree
Hide file tree
Showing 26 changed files with 552 additions and 619 deletions.
10 changes: 5 additions & 5 deletions Classes/Backend/EventListener/PreviewEventListener.php
Expand Up @@ -18,19 +18,19 @@ final class PreviewEventListener
*
* @var string
*/
const KEY = 'camaliga';
public const KEY = 'camaliga';

/**
* Path to the locallang file
*
* @var string
*/
const LLPATH = 'LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:';
public const LLPATH = 'LLL:EXT:camaliga/Resources/Private/Language/locallang_be.xlf:';

/**
* Max shown settings
*/
const SETTINGS_IN_PREVIEW = 10;
public const SETTINGS_IN_PREVIEW = 10;

protected $recordMapping = [
'listId' => [
Expand Down Expand Up @@ -84,8 +84,8 @@ public function __invoke(PageContentPreviewRenderingEvent $event): void
return;
}
if ($event->getRecord()['CType'] === 'list' && in_array($event->getRecord()['list_type'], $this->pis)) {
$pi = substr($event->getRecord()['list_type'], strpos($event->getRecord()['list_type'], '_')+1);
$header = '<strong>' . htmlspecialchars($this->getLanguageService()->sL(self::LLPATH . 'template.' . $pi)) . '</strong>';
$pi = substr((string) $event->getRecord()['list_type'], strpos((string) $event->getRecord()['list_type'], '_')+1);
$header = '<strong>' . htmlspecialchars((string) $this->getLanguageService()->sL(self::LLPATH . 'template.' . $pi)) . '</strong>';
$this->flexformData = GeneralUtility::xml2array($event->getRecord()['pi_flexform']);

$this->getStartingPoint($event->getRecord()['pages']);
Expand Down
20 changes: 10 additions & 10 deletions Classes/Controller/BackendController.php
@@ -1,6 +1,8 @@
<?php
namespace Quizpalme\Camaliga\Controller;

use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use Quizpalme\Camaliga\Domain\Repository\ContentRepository;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use Psr\Http\Message\ResponseInterface;
Expand Down Expand Up @@ -39,19 +41,19 @@
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later
*
*/
class BackendController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
class BackendController extends ActionController
{

protected int $id;

protected ModuleTemplate $moduleTemplate;

/**
* contentRepository
*
* @var \Quizpalme\Camaliga\Domain\Repository\ContentRepository
*/
protected $contentRepository;
* contentRepository
*
* @var ContentRepository
*/
protected $contentRepository;

public function __construct(
protected readonly ModuleTemplateFactory $moduleTemplateFactory,
Expand All @@ -66,10 +68,8 @@ public function initializeAction()

/**
* Injects the content-Repository
*
* @param \Quizpalme\Camaliga\Domain\Repository\ContentRepository $contentRepository
*/
public function injectContentRepository(\Quizpalme\Camaliga\Domain\Repository\ContentRepository $contentRepository)
public function injectContentRepository(ContentRepository $contentRepository)
{
$this->contentRepository = $contentRepository;
}
Expand Down Expand Up @@ -113,7 +113,7 @@ public function thumbAction(): ResponseInterface
}
}
// Elemente sortiert holen
$contents = $this->contentRepository->findAll('sorting', 'asc', false, array($pid));
$contents = $this->contentRepository->findAll('sorting', 'asc', false, [$pid]);

$this->view->assign('pid', $pid);
$this->view->assign('saved', $saved);
Expand Down
103 changes: 54 additions & 49 deletions Classes/Controller/ContentController.php

Large diffs are not rendered by default.

36 changes: 19 additions & 17 deletions Classes/Domain/Model/Category.php
@@ -1,33 +1,35 @@
<?php
namespace Quizpalme\Camaliga\Domain\Model;

use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
use TYPO3\CMS\Extbase\Annotation\ORM\Lazy;
class Category extends \TYPO3\CMS\Extbase\Domain\Model\Category
{
/**
* categories
*
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Quizpalme\Camaliga\Domain\Model\Category>
*/
protected $categories;
* categories
*
* @var ObjectStorage<\Quizpalme\Camaliga\Domain\Model\Category>
*/
#[Lazy]
protected $categories;

/**
* Get categories
*
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\Quizpalme\Camaliga\Domain\Model\Category>
*/
public function getCategories()
* Get categories
*
* @return ObjectStorage<\Quizpalme\Camaliga\Domain\Model\Category>
*/
public function getCategories()
{
return $this->categories;
}

/**
* Set categories
*
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $categories
* @return void
*/
public function setCategories($categories)
* Set categories
*
* @param ObjectStorage $categories
* @return void
*/
public function setCategories($categories)
{
$this->categories = $categories;
}
Expand Down

0 comments on commit 17ef646

Please sign in to comment.