inital commit
This commit is contained in:
commit
d950880d65
114
Classes/Controller/IngredientsController.php
Executable file
114
Classes/Controller/IngredientsController.php
Executable file
@ -0,0 +1,114 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Controller;
|
||||
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Utility\MathUtility;
|
||||
use A2G\A2gProducts\Services\FeuserSessionService;
|
||||
use A2G\A2gProducts\Domain\Model\Ingredients;
|
||||
use A2G\A2gProducts\Domain\Traits\{
|
||||
InjectIngredientsRepositoryTrait,
|
||||
InjectImageServiceTrait
|
||||
};
|
||||
use A2G\A2gProducts\PageTitle\A2gPageTitleProvider;
|
||||
use TYPO3\CMS\Core\MetaTag\MetaTagManagerRegistry;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
|
||||
/**
|
||||
* This file is part of the "Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* IngredientsController
|
||||
*/
|
||||
class IngredientsController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
|
||||
|
||||
use InjectIngredientsRepositoryTrait;
|
||||
use InjectImageServiceTrait;
|
||||
|
||||
/**
|
||||
* action list
|
||||
*
|
||||
* @return string|object|null|void
|
||||
*/
|
||||
public function listAction() {
|
||||
$ingredients = $this->ingredientsRepository->findAll();
|
||||
$this->view->assign('contentObjectUid', $this->configurationManager->getContentObject()->data['uid']);
|
||||
|
||||
$this->view->assign('ingredients', $ingredients);
|
||||
}
|
||||
|
||||
/**
|
||||
* action ajaxListAction
|
||||
*
|
||||
* @return string|object|null|void
|
||||
*/
|
||||
public function ajaxListAction() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* action show
|
||||
*
|
||||
* @param Ingredients $ingredient
|
||||
* @return string|object|null|void
|
||||
*/
|
||||
public function showAction(Ingredients $ingredient) {
|
||||
$titleProvider = GeneralUtility::makeInstance(A2gPageTitleProvider::class);
|
||||
|
||||
if(array_key_exists('pageTitleSuffix', $this->settings) && $this->settings['pageTitleSuffix'] !== null && $this->settings['pageTitleSuffix'] !== '' && (strlen($ingredient->getTitle()) + strlen($this->settings['pageTitleSuffix'])) < 66 ){
|
||||
$pageTitle = $ingredient->getTitle(). ' ' . $this->settings['pageTitleSuffix'];
|
||||
} else {
|
||||
$pageTitle = $ingredient->getTitle();
|
||||
}
|
||||
$titleProvider->setTitle($pageTitle);
|
||||
$contentObject = GeneralUtility::makeInstance(ContentObjectRenderer::class);
|
||||
$description = $contentObject->crop($ingredient->getDescription(), 125 . '|...|' . true);
|
||||
|
||||
$uri = $this->uriBuilder->reset()->setCreateAbsoluteUri(true)->setTargetPageUid(
|
||||
$GLOBALS['TSFE']->id)->uriFor('show', ['ingredient' => $ingredient], 'Ingredients', 'a2gProducts', 'ingredientsdetail');
|
||||
|
||||
|
||||
$this->view->assign('contentObjectUid', $this->configurationManager->getContentObject()->data['uid']);
|
||||
|
||||
$metaTagManager = GeneralUtility::makeInstance(MetaTagManagerRegistry::class);
|
||||
|
||||
/* TODO change
|
||||
$metaTagManager->getManagerForProperty('robots')->addProperty('robots', 'index, folow');
|
||||
$metaTagManager->getManagerForProperty('og:type')->addProperty('og:type', 'website');
|
||||
$metaTagManager->getManagerForProperty('twitter:card')->addProperty('twitter:card', 'summary_large_image');
|
||||
|
||||
if ($ingredient->getTitle() !== '') {
|
||||
$metaTagManager->getManagerForProperty('title')->addProperty('title', $pageTitle);
|
||||
$metaTagManager->getManagerForProperty('og:title')->addProperty('og:title', $pageTitle);
|
||||
$metaTagManager->getManagerForProperty('twitter:title')->addProperty('twitter:title', $pageTitle);
|
||||
}
|
||||
if ($ingredient->getDescription() !== '') {
|
||||
$metaTagManager->getManagerForProperty('description')->addProperty('description', $description);
|
||||
$metaTagManager->getManagerForProperty('og:description')->addProperty('og:description', $description);
|
||||
$metaTagManager->getManagerForProperty('twitter:description')->addProperty('twitter:description', $description);
|
||||
}
|
||||
$metaTagManager->getManagerForProperty('og:url')->addProperty('og:url', $uri);
|
||||
$metaTagManager->getManagerForProperty('twitter:url')->addProperty('twitter:url', $uri);
|
||||
|
||||
if ($ingredient->getImage() !== null) {
|
||||
$processedImage = $this->imageService->applyProcessingInstructions(
|
||||
$this->imageService->getImage('', $ingredient->getImage(), false),
|
||||
['width' => '
|
||||
1200', 'height' => '630c']
|
||||
);
|
||||
$metaTagManager->getManagerForProperty('twitter:image')->addProperty('twitter:image', $this->imageService->getImageUri($processedImage, true));
|
||||
$metaTagManager->getManagerForProperty('og:image')->addProperty('og:image', $this->imageService->getImageUri($processedImage, true));
|
||||
}
|
||||
*/
|
||||
$this->view->assign('ingredient', $ingredient);
|
||||
}
|
||||
|
||||
}
|
222
Classes/Controller/ProductsController.php
Executable file
222
Classes/Controller/ProductsController.php
Executable file
@ -0,0 +1,222 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Controller;
|
||||
|
||||
use TYPO3\CMS\Core\Utility\MathUtility;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use A2G\A2gProducts\Services\FeuserSessionService;
|
||||
use A2G\A2gProducts\Domain\Traits\{
|
||||
InjectCategoriesRepositoryTrait,
|
||||
InjectProductsRepositoryTrait,
|
||||
InjectFiltersRepositoryTrait,
|
||||
InjectImageServiceTrait
|
||||
};
|
||||
use A2G\A2gProducts\PageTitle\A2gPageTitleProvider;
|
||||
use TYPO3\CMS\Core\MetaTag\MetaTagManagerRegistry;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
use A2G\A2gToolkit\Domain\Traits\SetMetaTagsTrait;
|
||||
|
||||
/**
|
||||
* This file is part of the "Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* ProductsController
|
||||
*/
|
||||
class ProductsController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
|
||||
|
||||
use InjectProductsRepositoryTrait;
|
||||
use InjectFiltersRepositoryTrait;
|
||||
use InjectCategoriesRepositoryTrait;
|
||||
use InjectImageServiceTrait;
|
||||
|
||||
use SetMetaTagsTrait;
|
||||
/**
|
||||
* @var FeuserSessionService
|
||||
*/
|
||||
protected $feuserSessionService = null;
|
||||
|
||||
/**
|
||||
* @param FeuserSessionService $feuserSessionService
|
||||
*/
|
||||
public function injectFeuserSessionService(FeuserSessionService $feuserSessionService) {
|
||||
$this->feuserSessionService = $feuserSessionService;
|
||||
}
|
||||
|
||||
/**
|
||||
* mapInt
|
||||
*
|
||||
* @param string $int
|
||||
* @return int|null
|
||||
*/
|
||||
static function mapInt(string $int): ?int {
|
||||
if (MathUtility::canBeInterpretedAsInteger($int)) {
|
||||
return (int) $int;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\DomainObject\AbstractEntity $obj
|
||||
* @return int|null
|
||||
*/
|
||||
static function mapGetUid(\TYPO3\CMS\Extbase\DomainObject\AbstractEntity $obj): ?int {
|
||||
return $obj->getUid();
|
||||
}
|
||||
|
||||
/**
|
||||
* action list
|
||||
*
|
||||
* @return string|object|null|void
|
||||
*/
|
||||
public function listAction() {
|
||||
$uniqid = $GLOBALS['TSFE']->id . '_' . $this->configurationManager->getContentObject()->data['uid'];
|
||||
$this->injectFeuserSessionService(new FeuserSessionService('a2gProducts_' . $uniqid . '_'));
|
||||
$activFilter = $this->feuserSessionService->get('filter');
|
||||
$searchField = $this->feuserSessionService->get('searchField');
|
||||
$catUids = array_filter(array_map('self::mapInt', explode(',', $this->settings['showCategories'])));
|
||||
|
||||
$categories = $this->categoriesRepository->findByUids($catUids);
|
||||
$filters = $this->filtersRepository->getFromCategories($catUids);
|
||||
if (!empty($activFilter)) {
|
||||
if ((int) $this->settings['ajaxListLimit'] === 0) {
|
||||
$products = $this->productsRepository->filter($catUids, $activFilter, $searchField, 0, 0, $filters);
|
||||
} else {
|
||||
$products = $this->productsRepository->filter($catUids, $activFilter, $searchField, $this->settings['ajaxListLimit'] + 2, 0, $filters);
|
||||
}
|
||||
} else {
|
||||
if ((int) $this->settings['ajaxListLimit'] === 0) {
|
||||
$products = $this->productsRepository->getFromCategories($catUids);
|
||||
} else {
|
||||
$products = $this->productsRepository->getFromCategories($catUids, (int) $this->settings['ajaxListLimit'] + 2);
|
||||
}
|
||||
}
|
||||
$this->view->assign('contentObjectUid', $this->configurationManager->getContentObject()->data['uid']);
|
||||
|
||||
$this->view->assign('categories', $categories);
|
||||
$this->view->assign('filters', $filters);
|
||||
$this->view->assign('activeFilter', $activFilter);
|
||||
$this->view->assign('searchField', $searchField);
|
||||
$this->view->assign('products', $products);
|
||||
$this->view->assign('uniqid', $uniqid);
|
||||
}
|
||||
|
||||
/**
|
||||
* action ajaxListAction
|
||||
*
|
||||
* @return string|object|null|void
|
||||
*/
|
||||
public function ajaxListAction() {
|
||||
$this->injectFeuserSessionService(new FeuserSessionService('a2gProducts_' . (string) $_POST['tx_a2gproducts_a2gproductlist']['uniqid'] . '_'));
|
||||
$uniqid = $GLOBALS['TSFE']->id . '_' . $this->configurationManager->getContentObject()->data['uid'];
|
||||
$settings = [
|
||||
'detailPage' => $_POST['tx_a2gproducts_a2gproductlist']['dp'],
|
||||
'showCategories' => $_POST['tx_a2gproducts_a2gproductlist']['sc'],
|
||||
'style' => $_POST['tx_a2gproducts_a2gproductlist']['style'],
|
||||
'ajaxListLimit' => (int) $_POST['tx_a2gproducts_a2gproductlist']['limit']
|
||||
];
|
||||
|
||||
$catUids = array_filter(array_map('self::mapInt', explode(',', $_POST['tx_a2gproducts_a2gproductlist']['sc'])));
|
||||
$filters = $this->filtersRepository->getFromCategories($catUids);
|
||||
|
||||
if (array_key_exists('filter',$_POST['tx_a2gproducts_a2gproductlist']) && $_POST['tx_a2gproducts_a2gproductlist']['filter'] === null) {
|
||||
$filter = [];
|
||||
} else {
|
||||
$filter = $_POST['tx_a2gproducts_a2gproductlist']['filter'];
|
||||
}
|
||||
|
||||
$this->feuserSessionService->set($filter, 'filter');
|
||||
$this->feuserSessionService->set($_POST['tx_a2gproducts_a2gproductlist']['searchField'], 'searchField');
|
||||
|
||||
// duplicate from listAction make a new function !!
|
||||
if (!empty($filter) || $_POST['tx_a2gproducts_a2gproductlist']['searchField'] !== '') {
|
||||
if ((int) $settings['ajaxListLimit'] === 0) {
|
||||
$products = $this->productsRepository->filter($catUids, $filter, $_POST['tx_a2gproducts_a2gproductlist']['searchField'], 0, 0, $filters);
|
||||
} else {
|
||||
$products = $this->productsRepository->filter($catUids, $filter, $_POST['tx_a2gproducts_a2gproductlist']['searchField'], $settings['ajaxListLimit'] + 2, (int) $_POST['tx_a2gproducts_a2gproductlist']['loads'] * $settings['ajaxListLimit'], $filters);
|
||||
}
|
||||
} else {
|
||||
if ((int) $settings['ajaxListLimit'] === 0) {
|
||||
$products = $this->productsRepository->getFromCategories($catUids);
|
||||
} else {
|
||||
$products = $this->productsRepository->getFromCategories($catUids, $settings['ajaxListLimit'] + 2, (int) $_POST['tx_a2gproducts_a2gproductlist']['loads'] * $settings['ajaxListLimit']);
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->assign('products', $products);
|
||||
$this->view->assign('filters', $filters);
|
||||
$this->view->assign('settings', $settings);
|
||||
}
|
||||
|
||||
static protected function isAllowedCategory(\A2G\A2gProducts\Domain\Model\Products $product, $categories){
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* action show
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\Products $product
|
||||
* @param \A2G\A2gProducts\Domain\Model\ProductVariants $productVariant
|
||||
* @return string|object|null|void
|
||||
*/
|
||||
public function showAction(\A2G\A2gProducts\Domain\Model\Products $product = null, \A2G\A2gProducts\Domain\Model\ProductVariants $productVariant = null) {
|
||||
|
||||
|
||||
|
||||
if($product === null){
|
||||
return GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Controller\ErrorController::class)
|
||||
->pageNotFoundAction(
|
||||
$GLOBALS['TYPO3_REQUEST'],
|
||||
'Shop Product not found!',
|
||||
['code' => \TYPO3\CMS\Frontend\Page\PageAccessFailureReasons::INVALID_PAGE_ARGUMENTS]
|
||||
);
|
||||
}
|
||||
|
||||
$titleProvider = GeneralUtility::makeInstance(A2gPageTitleProvider::class);
|
||||
$contentObject = GeneralUtility::makeInstance(ContentObjectRenderer::class);
|
||||
$description = $contentObject->crop($product->getDescription(), 125 . '|...|' . true);
|
||||
$imageUri=null;
|
||||
if ($product->getImage() !== null) {
|
||||
$processedImage = $this->imageService->applyProcessingInstructions(
|
||||
$this->imageService->getImage('', $product->getImage(), false),
|
||||
['width' => '1200c', 'height' => '630']
|
||||
);
|
||||
$imageUri = $this->imageService->getImageUri($processedImage, true);
|
||||
}
|
||||
|
||||
$this->view->assign('product', $product);
|
||||
|
||||
if($productVariant === null){
|
||||
$uri = $this->uriBuilder->reset()->setCreateAbsoluteUri(true)->setTargetPageUid(
|
||||
$GLOBALS['TSFE']->id)->uriFor('show', ['product' => $product], 'Products', 'a2gShop', 'A2gproductsdetail');
|
||||
} else {
|
||||
$uri = $this->uriBuilder->reset()->setCreateAbsoluteUri(true)->setTargetPageUid(
|
||||
$GLOBALS['TSFE']->id)->uriFor('show', ['product' => $product, 'productVariant' => $productVariant], 'Products', 'a2gShop', 'A2gproductsdetail');
|
||||
}
|
||||
if($productVariant !== null && array_key_exists('pageTitleSuffix', $this->settings) && $this->settings['pageTitleSuffix'] !== '' && (strlen($product->getTitle()) + (strlen($productVariant->getTitle()) + strlen($this->settings['pageTitleSuffix'])) < 65 )){
|
||||
$titleProvider->setTitle($product->getTitle() . ' ' .$productVariant->getTitle() .' - ' . $this->settings['pageTitleSuffix']);
|
||||
$this->setMetaTags($product->getTitle(). ' ' .$productVariant->getTitle() .' - ' . $this->settings['pageTitleSuffix'], $description, $uri, $imageUri);
|
||||
} else if($productVariant !== null && (strlen($product->getTitle()) + strlen($productVariant->getTitle())) < 65 ){
|
||||
$titleProvider->setTitle($product->getTitle() . ' ' .$productVariant->getTitle());
|
||||
$this->setMetaTags($product->getTitle(). ' ' .$productVariant->getTitle(), $description, $uri, $imageUri);
|
||||
}else if(array_key_exists('pageTitleSuffix', $this->settings) && $this->settings['pageTitleSuffix'] !== '' && (strlen($product->getTitle()) + strlen($this->settings['pageTitleSuffix'])) < 66 ){
|
||||
$titleProvider->setTitle($product->getTitle() .' - ' . $this->settings['pageTitleSuffix']);
|
||||
$this->setMetaTags($product->getTitle() .' - ' . $this->settings['pageTitleSuffix'], $description, $uri, $imageUri);
|
||||
} else {
|
||||
$titleProvider->setTitle($product->getTitle());
|
||||
$this->setMetaTags($product->getTitle(), $description, $uri, $imageUri);
|
||||
}
|
||||
if(!array_key_exists('listPage', $this->settings)){
|
||||
$this->view->assign('contentObjectUid', $this->configurationManager->getContentObject()->data['uid']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
104
Classes/Domain/Model/Brands.php
Executable file
104
Classes/Domain/Model/Brands.php
Executable file
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Model;
|
||||
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
|
||||
|
||||
/**
|
||||
* This file is part of the "Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* Brands
|
||||
*/
|
||||
class Brands extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
|
||||
|
||||
|
||||
/**
|
||||
* title
|
||||
*
|
||||
* @var string
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
|
||||
/**
|
||||
* image
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $image = null;
|
||||
|
||||
/**
|
||||
* Returns the title
|
||||
*
|
||||
* @return string $title
|
||||
*/
|
||||
public function getTitle() {
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the title
|
||||
*
|
||||
* @param string $title
|
||||
* @return void
|
||||
*/
|
||||
public function setTitle(string $title) {
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the image
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
|
||||
*/
|
||||
public function getImage() {
|
||||
if ($this->image instanceof LazyLoadingProxy) {
|
||||
$this->image = $this->image->_loadRealInstance();
|
||||
}
|
||||
return $this->image;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the image
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
|
||||
* @return void
|
||||
*/
|
||||
public function setImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) {
|
||||
$this->image = $image;
|
||||
}
|
||||
|
||||
/**
|
||||
* __construct
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
// Do not remove the next line: It would break the functionality
|
||||
$this->initializeObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes all ObjectStorage properties when model is reconstructed from DB (where __construct is not called)
|
||||
* Do not modify this method!
|
||||
* It will be rewritten on each save in the extension builder
|
||||
* You may modify the constructor of this class instead
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initializeObject() {
|
||||
|
||||
}
|
||||
|
||||
}
|
180
Classes/Domain/Model/Categories.php
Executable file
180
Classes/Domain/Model/Categories.php
Executable file
@ -0,0 +1,180 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Model;
|
||||
|
||||
|
||||
/**
|
||||
* This file is part of the "altogether Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* Categories
|
||||
*/
|
||||
class Categories extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
||||
{
|
||||
|
||||
/**
|
||||
* title
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
/**
|
||||
* description
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = '';
|
||||
|
||||
/**
|
||||
* image
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
*/
|
||||
protected $image = null;
|
||||
|
||||
/**
|
||||
* relFilters
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\Filters>
|
||||
*/
|
||||
protected $relFilters = null;
|
||||
|
||||
/**
|
||||
* __construct
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
// Do not remove the next line: It would break the functionality
|
||||
$this->initializeObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes all ObjectStorage properties when model is reconstructed from DB (where __construct is not called)
|
||||
* Do not modify this method!
|
||||
* It will be rewritten on each save in the extension builder
|
||||
* You may modify the constructor of this class instead
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initializeObject()
|
||||
{
|
||||
$this->relFilters = $this->relFilters ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the title
|
||||
*
|
||||
* @return string $title
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the title
|
||||
*
|
||||
* @param string $title
|
||||
* @return void
|
||||
*/
|
||||
public function setTitle(string $title)
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description
|
||||
*
|
||||
* @return string $description
|
||||
*/
|
||||
public function getDescription()
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the description
|
||||
*
|
||||
* @param string $description
|
||||
* @return void
|
||||
*/
|
||||
public function setDescription(string $description)
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the image
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
|
||||
*/
|
||||
public function getImage()
|
||||
{
|
||||
return $this->image;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the image
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
|
||||
* @return void
|
||||
*/
|
||||
public function setImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image)
|
||||
{
|
||||
$this->image = $image;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a Filters
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\Filters $relFilter
|
||||
* @return void
|
||||
*/
|
||||
public function addRelFilter(\A2G\A2gProducts\Domain\Model\Filters $relFilter)
|
||||
{
|
||||
$this->relFilters->attach($relFilter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a Filters
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\Filters $relFilterToRemove The Filters to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeRelFilter(\A2G\A2gProducts\Domain\Model\Filters $relFilterToRemove)
|
||||
{
|
||||
$this->relFilters->detach($relFilterToRemove);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relFilters
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\Filters> $relFilters
|
||||
*/
|
||||
public function getRelFilters()
|
||||
{
|
||||
return $this->relFilters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relFilters
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\Filters> $relFilters
|
||||
* @return void
|
||||
*/
|
||||
public function setRelFilters(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $relFilters)
|
||||
{
|
||||
$this->relFilters = $relFilters;
|
||||
}
|
||||
}
|
120
Classes/Domain/Model/FilterOptions.php
Executable file
120
Classes/Domain/Model/FilterOptions.php
Executable file
@ -0,0 +1,120 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Model;
|
||||
|
||||
|
||||
/**
|
||||
* This file is part of the "altogether Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* FilterOptions
|
||||
*/
|
||||
class FilterOptions extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
||||
{
|
||||
|
||||
/**
|
||||
* title
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
/**
|
||||
* valueMin
|
||||
*
|
||||
* @var float
|
||||
*/
|
||||
protected $valueMin = 0.0;
|
||||
|
||||
/**
|
||||
* valueMax
|
||||
*
|
||||
* @var float
|
||||
*/
|
||||
protected $valueMax = 0.0;
|
||||
|
||||
/**
|
||||
* Returns the title
|
||||
*
|
||||
* @return string $title
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the title
|
||||
*
|
||||
* @param string $title
|
||||
* @return void
|
||||
*/
|
||||
public function setTitle(string $title)
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the valueMin
|
||||
*
|
||||
* @return float $valueMin
|
||||
*/
|
||||
public function getValueMin()
|
||||
{
|
||||
return $this->valueMin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the valueMin
|
||||
*
|
||||
* @param float $valueMin
|
||||
* @return void
|
||||
*/
|
||||
public function setValueMin(float $valueMin)
|
||||
{
|
||||
$this->valueMin = $valueMin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the valueMax
|
||||
*
|
||||
* @return float $valueMax
|
||||
*/
|
||||
public function getValueMax()
|
||||
{
|
||||
return $this->valueMax;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the valueMax
|
||||
*
|
||||
* @param float $valueMax
|
||||
* @return void
|
||||
*/
|
||||
public function setValueMax(float $valueMax)
|
||||
{
|
||||
$this->valueMax = $valueMax;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for _localizedUid.
|
||||
*
|
||||
* @return int|null The _localizedUid or NULL if none set yet.
|
||||
*/
|
||||
public function getLocalizedUid(): ?int
|
||||
{
|
||||
if ($this->_localizedUid !== null) {
|
||||
return (int)$this->_localizedUid;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
99
Classes/Domain/Model/FilterValues.php
Executable file
99
Classes/Domain/Model/FilterValues.php
Executable file
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Model;
|
||||
|
||||
/**
|
||||
* This file is part of the "altogether Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* FilterValues
|
||||
*/
|
||||
class FilterValues extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
|
||||
|
||||
/**
|
||||
* value
|
||||
*
|
||||
* @var float
|
||||
*/
|
||||
protected $value = 0.0;
|
||||
|
||||
/**
|
||||
* relFilterOptions
|
||||
*
|
||||
* @var \A2G\A2gProducts\Domain\Model\FilterOptions
|
||||
*/
|
||||
protected $relFilterOption = null;
|
||||
|
||||
/**
|
||||
* relFilters
|
||||
*
|
||||
* @var \A2G\A2gProducts\Domain\Model\Filters
|
||||
*/
|
||||
protected $relFilters = null;
|
||||
|
||||
/**
|
||||
* Returns the value
|
||||
*
|
||||
* @return float $value
|
||||
*/
|
||||
public function getValue() {
|
||||
return $this->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value
|
||||
*
|
||||
* @param float $value
|
||||
* @return void
|
||||
*/
|
||||
public function setValue(float $value) {
|
||||
$this->value = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relFilterOption
|
||||
*
|
||||
* @return \A2G\A2gProducts\Domain\Model\FilterOptions $relFilterOption
|
||||
*/
|
||||
public function getRelFilterOption() {
|
||||
return $this->relFilterOption;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relFilterOption
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\FilterOptions $relFilterOptio
|
||||
* @return void
|
||||
*/
|
||||
public function setRelFilterOption(\A2G\A2gProducts\Domain\Model\FilterOptions $relFilterOptions) {
|
||||
$this->relFilterOption = $relFilterOption;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relFilters
|
||||
*
|
||||
* @return \A2G\A2gProducts\Domain\Model\Filters $relFilters
|
||||
*/
|
||||
public function getRelFilters() {
|
||||
return $this->relFilters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relFilters
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\Filters $relFilters
|
||||
* @return void
|
||||
*/
|
||||
public function setRelFilters(\A2G\A2gProducts\Domain\Model\Filters $relFilters) {
|
||||
$this->relFilters = $relFilters;
|
||||
}
|
||||
|
||||
}
|
234
Classes/Domain/Model/Filters.php
Executable file
234
Classes/Domain/Model/Filters.php
Executable file
@ -0,0 +1,234 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Model;
|
||||
|
||||
|
||||
/**
|
||||
* This file is part of the "altogether Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* Filters
|
||||
*/
|
||||
class Filters extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
|
||||
{
|
||||
|
||||
/**
|
||||
* dbOperations
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
static public $dbOperations = [
|
||||
1 => '=',
|
||||
2 => '>',
|
||||
3 => '<',
|
||||
4 => '>=',
|
||||
5 => '<=',
|
||||
6 => 'IN'
|
||||
];
|
||||
|
||||
|
||||
/**
|
||||
* dbType
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
static public $dbType = [
|
||||
1 => 'range ( uses min and max value )',
|
||||
2 => 'compare ( uses just min value )',
|
||||
3 => 'useFilterOptions'
|
||||
];
|
||||
|
||||
/**
|
||||
* title
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
/**
|
||||
* filterType
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $filterType = '';
|
||||
|
||||
/**
|
||||
* dbOperationMax
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $dbOperationMax = 0;
|
||||
|
||||
/**
|
||||
* dbOperationMin
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
protected $dbOperationMin = '';
|
||||
|
||||
/**
|
||||
* relFilterOption
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\FilterOptions>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
*/
|
||||
protected $relFilterOption = null;
|
||||
|
||||
/**
|
||||
* Returns the title
|
||||
*
|
||||
* @return string $title
|
||||
*/
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the title
|
||||
*
|
||||
* @param string $title
|
||||
* @return void
|
||||
*/
|
||||
public function setTitle(string $title)
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the filterType
|
||||
*
|
||||
* @return string $filterType
|
||||
*/
|
||||
public function getFilterType()
|
||||
{
|
||||
return $this->filterType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the filterType
|
||||
*
|
||||
* @param string $filterType
|
||||
* @return void
|
||||
*/
|
||||
public function setFilterType(string $filterType)
|
||||
{
|
||||
$this->filterType = $filterType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the dbOperationMax
|
||||
*
|
||||
* @return int $dbOperationMax
|
||||
*/
|
||||
public function getDbOperationMax()
|
||||
{
|
||||
return $this->dbOperationMax;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the dbOperationMax
|
||||
*
|
||||
* @param int $dbOperationMax
|
||||
* @return void
|
||||
*/
|
||||
public function setDbOperationMax(int $dbOperationMax)
|
||||
{
|
||||
$this->dbOperationMax = $dbOperationMax;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the dbOperationMin
|
||||
*
|
||||
* @return int dbOperationMin
|
||||
*/
|
||||
public function getDbOperationMin()
|
||||
{
|
||||
return $this->dbOperationMin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the dbOperationMin
|
||||
*
|
||||
* @param string $dbOperationMin
|
||||
* @return void
|
||||
*/
|
||||
public function setDbOperationMin(string $dbOperationMin)
|
||||
{
|
||||
$this->dbOperationMin = $dbOperationMin;
|
||||
}
|
||||
|
||||
/**
|
||||
* __construct
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
// Do not remove the next line: It would break the functionality
|
||||
$this->initializeObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes all ObjectStorage properties when model is reconstructed from DB (where __construct is not called)
|
||||
* Do not modify this method!
|
||||
* It will be rewritten on each save in the extension builder
|
||||
* You may modify the constructor of this class instead
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initializeObject()
|
||||
{
|
||||
$this->relFilterOption = $this->relFilterOption ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a FilterOptions
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\FilterOptions $relFilterOption
|
||||
* @return void
|
||||
*/
|
||||
public function addRelFilterOption(\A2G\A2gProducts\Domain\Model\FilterOptions $relFilterOption)
|
||||
{
|
||||
$this->relFilterOption->attach($relFilterOption);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a FilterOptions
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\FilterOptions $relFilterOptionToRemove The FilterOptions to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeRelFilterOption(\A2G\A2gProducts\Domain\Model\FilterOptions $relFilterOptionToRemove)
|
||||
{
|
||||
$this->relFilterOption->detach($relFilterOptionToRemove);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relFilterOption
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\FilterOptions> $relFilterOption
|
||||
*/
|
||||
public function getRelFilterOption()
|
||||
{
|
||||
return $this->relFilterOption;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relFilterOption
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\FilterOptions> $relFilterOption
|
||||
* @return void
|
||||
*/
|
||||
public function setRelFilterOption(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $relFilterOption)
|
||||
{
|
||||
$this->relFilterOption = $relFilterOption;
|
||||
}
|
||||
}
|
303
Classes/Domain/Model/Ingredients.php
Executable file
303
Classes/Domain/Model/Ingredients.php
Executable file
@ -0,0 +1,303 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Model;
|
||||
|
||||
use A2G\A2gProducts\Domain\Model\{
|
||||
Products,
|
||||
MasonryItem
|
||||
};
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
|
||||
|
||||
/**
|
||||
* This file is part of the "Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* Ingredients
|
||||
*/
|
||||
class Ingredients extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
|
||||
|
||||
/**
|
||||
* title
|
||||
*
|
||||
* @var string
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
/**
|
||||
* pathSegment
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $pathSegment = '';
|
||||
|
||||
/**
|
||||
* description
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = '';
|
||||
|
||||
/**
|
||||
* image
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $image = null;
|
||||
|
||||
/**
|
||||
* images
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $images = null;
|
||||
|
||||
/**
|
||||
* gallery
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<MasonryItem>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $gallery = null;
|
||||
|
||||
|
||||
/**
|
||||
* relProducts
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Products>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relProducts = null;
|
||||
|
||||
|
||||
/**
|
||||
* Returns the title
|
||||
*
|
||||
* @return string $title
|
||||
*/
|
||||
public function getTitle() {
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the title
|
||||
*
|
||||
* @param string $title
|
||||
* @return void
|
||||
*/
|
||||
public function setTitle(string $title) {
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the pathSegment
|
||||
*
|
||||
* @return string $pathSegment
|
||||
*/
|
||||
public function getPathSegment()
|
||||
{
|
||||
return $this->pathSegment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the pathSegment
|
||||
*
|
||||
* @param string $pathSegment
|
||||
* @return void
|
||||
*/
|
||||
public function setPathSegment($pathSegment)
|
||||
{
|
||||
$this->pathSegment = $pathSegment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description
|
||||
*
|
||||
* @return string $description
|
||||
*/
|
||||
public function getDescription() {
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the description
|
||||
*
|
||||
* @param string $description
|
||||
* @return void
|
||||
*/
|
||||
public function setDescription(string $description) {
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the image
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
|
||||
*/
|
||||
public function getImage() {
|
||||
if ($this->image instanceof LazyLoadingProxy) {
|
||||
$this->image = $this->image->_loadRealInstance();
|
||||
}
|
||||
return $this->image;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the image
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
|
||||
* @return void
|
||||
*/
|
||||
public function setImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) {
|
||||
$this->image = $image;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the images
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $images
|
||||
*/
|
||||
public function getImages() {
|
||||
return $this->images;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the images
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $images
|
||||
* @return void
|
||||
*/
|
||||
public function setImages(\TYPO3\CMS\Extbase\Domain\Model\FileReference $images) {
|
||||
$this->images = $images;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the gallery
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $gallery
|
||||
*/
|
||||
public function getGallery() {
|
||||
return $this->gallery;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the gallery
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $gallery
|
||||
* @return void
|
||||
*/
|
||||
public function setGallery(\TYPO3\CMS\Extbase\Domain\Model\FileReference $gallery) {
|
||||
$this->gallery = $gallery;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* __construct
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
// Do not remove the next line: It would break the functionality
|
||||
$this->initializeObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes all ObjectStorage properties when model is reconstructed from DB (where __construct is not called)
|
||||
* Do not modify this method!
|
||||
* It will be rewritten on each save in the extension builder
|
||||
* You may modify the constructor of this class instead
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initializeObject() {
|
||||
$this->gallery = $this->gallery ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
$this->relProducts = $this->relProducts ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds a MasonryItem
|
||||
*
|
||||
* @param MasonryItem $relMasonryItem
|
||||
* @return void
|
||||
*/
|
||||
public function addGallerys(MasonryItem $relMasonryItem) {
|
||||
$this->gallery->attach($relMasonryItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a MasonryItem
|
||||
*
|
||||
* @param MasonryItem $relMasonryItem The MasonryItem to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeGallerys(MasonryItem $relMasonryItem) {
|
||||
$this->gallery->detach($relMasonryItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the gallery
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<MasonryItem> $gallery
|
||||
*/
|
||||
public function getGallerys() {
|
||||
return $this->gallery;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the gallery
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<MasonryItem> $gallery
|
||||
* @return void
|
||||
*/
|
||||
public function setGallerys(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $gallery) {
|
||||
$this->gallery = $gallery;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a Products
|
||||
*
|
||||
* @param Products $relProducts
|
||||
* @return void
|
||||
*/
|
||||
public function addRelProducts(Products $relProducts) {
|
||||
$this->relProducts->attach($relProducts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a Products
|
||||
*
|
||||
* @param Products $relProducts The Products to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeRelProducts(Products $relProducts) {
|
||||
$this->relProducts->detach($relProducts);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relProducts
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Products> $relProducts
|
||||
*/
|
||||
public function getRelProducts() {
|
||||
return $this->relProducts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relProducts
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Products> $relProducts
|
||||
* @return void
|
||||
*/
|
||||
public function setRelProducts(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $relProducts) {
|
||||
$this->relProducts = $relProducts;
|
||||
}
|
||||
}
|
96
Classes/Domain/Model/MasonryItem.php
Executable file
96
Classes/Domain/Model/MasonryItem.php
Executable file
@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Model;
|
||||
|
||||
use A2G\A2gProducts\Domain\Model\Ingredients;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
|
||||
|
||||
/**
|
||||
* This file is part of the "Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* MasonryItem
|
||||
*/
|
||||
class MasonryItem extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
|
||||
|
||||
/**
|
||||
* header
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $header = '';
|
||||
|
||||
/**
|
||||
* itemClass
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $itemClass = '';
|
||||
|
||||
/**
|
||||
* image
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $image = null;
|
||||
|
||||
public function getHeader(): string {
|
||||
return $this->header;
|
||||
}
|
||||
|
||||
public function getItemClass(): string {
|
||||
return $this->itemClass;
|
||||
}
|
||||
|
||||
public function getImage(): \TYPO3\CMS\Extbase\Domain\Model\FileReference {
|
||||
if ($this->image instanceof LazyLoadingProxy) {
|
||||
$this->image = $this->image->_loadRealInstance();
|
||||
}
|
||||
return $this->image;
|
||||
}
|
||||
|
||||
public function setHeader(string $header): void {
|
||||
$this->header = $header;
|
||||
}
|
||||
|
||||
public function setItemClass(string $itemClass): void {
|
||||
$this->itemClass = $itemClass;
|
||||
}
|
||||
|
||||
public function setImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image): void {
|
||||
$this->image = $image;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* __construct
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
// Do not remove the next line: It would break the functionality
|
||||
$this->initializeObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes all ObjectStorage properties when model is reconstructed from DB (where __construct is not called)
|
||||
* Do not modify this method!
|
||||
* It will be rewritten on each save in the extension builder
|
||||
* You may modify the constructor of this class instead
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initializeObject() {
|
||||
$this->relCategory = $this->relCategory ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
$this->relFilterValues = $this->relFilterValues ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
}
|
||||
|
||||
}
|
180
Classes/Domain/Model/ProductVariantSizes.php
Executable file
180
Classes/Domain/Model/ProductVariantSizes.php
Executable file
@ -0,0 +1,180 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Model;
|
||||
|
||||
use A2G\A2gProducts\Domain\Model\{
|
||||
Ingredients,
|
||||
ProductVariants
|
||||
|
||||
};
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
|
||||
|
||||
/**
|
||||
* This file is part of the "Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* ProductVariants
|
||||
*/
|
||||
class ProductVariantSizes extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
|
||||
|
||||
/**
|
||||
* nr
|
||||
*
|
||||
* @var string
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
|
||||
*/
|
||||
protected $nr = '';
|
||||
|
||||
/**
|
||||
* title
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
/**
|
||||
* pathSegment
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $pathSegment = '';
|
||||
|
||||
/**
|
||||
* description
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = '';
|
||||
|
||||
/**
|
||||
* @var ProductVariants
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $productvariant = null;
|
||||
|
||||
/**
|
||||
*
|
||||
* @return ProductVariants
|
||||
*/
|
||||
public function getProductvariant(): ProductVariants {
|
||||
if ($this->productvariant instanceof LazyLoadingProxy) {
|
||||
$this->productvariant = $this->productvariant->_loadRealInstance();
|
||||
}
|
||||
return $this->productvariant;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ProductVariants $productvariant
|
||||
* @return void
|
||||
*/
|
||||
public function setProductvariant(ProductVariants $productvariant): void {
|
||||
$this->productvariant = $productvariant;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the nr
|
||||
*
|
||||
* @return string $nr
|
||||
*/
|
||||
public function getNr() {
|
||||
return $this->nr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the nr
|
||||
*
|
||||
* @param string $nr
|
||||
* @return void
|
||||
*/
|
||||
public function setNr(string $nr) {
|
||||
$this->nr = $nr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the title
|
||||
*
|
||||
* @return string $title
|
||||
*/
|
||||
public function getTitle() {
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the title
|
||||
*
|
||||
* @param string $title
|
||||
* @return void
|
||||
*/
|
||||
public function setTitle(string $title) {
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the pathSegment
|
||||
*
|
||||
* @return string $pathSegment
|
||||
*/
|
||||
public function getPathSegment()
|
||||
{
|
||||
return $this->pathSegment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the pathSegment
|
||||
*
|
||||
* @param string $pathSegment
|
||||
* @return void
|
||||
*/
|
||||
public function setPathSegment($pathSegment)
|
||||
{
|
||||
$this->pathSegment = $pathSegment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description
|
||||
*
|
||||
* @return string $description
|
||||
*/
|
||||
public function getDescription() {
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the description
|
||||
*
|
||||
* @param string $description
|
||||
* @return void
|
||||
*/
|
||||
public function setDescription(string $description) {
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* __construct
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->initializeObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes all ObjectStorage properties when model is reconstructed from DB (where __construct is not called)
|
||||
* Do not modify this method!
|
||||
* It will be rewritten on each save in the extension builder
|
||||
* You may modify the constructor of this class instead
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initializeObject() {
|
||||
}
|
||||
|
||||
}
|
632
Classes/Domain/Model/ProductVariants.php
Executable file
632
Classes/Domain/Model/ProductVariants.php
Executable file
@ -0,0 +1,632 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Model;
|
||||
|
||||
use A2G\A2gProducts\Domain\Model\{
|
||||
Ingredients,
|
||||
Products
|
||||
|
||||
};
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
|
||||
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||
|
||||
/**
|
||||
* This file is part of the "Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* ProductVariants
|
||||
*/
|
||||
class ProductVariants extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
|
||||
|
||||
/**
|
||||
* nr
|
||||
*
|
||||
* @var string
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
|
||||
*/
|
||||
protected $nr = '';
|
||||
|
||||
/**
|
||||
* title
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
/**
|
||||
* pathSegment
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $pathSegment = '';
|
||||
|
||||
/**
|
||||
* description
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = '';
|
||||
|
||||
/**
|
||||
* image
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $image = null;
|
||||
|
||||
/**
|
||||
* tabIcon
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $tabIcon = null;
|
||||
|
||||
/**
|
||||
* images
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $images = null;
|
||||
|
||||
/**
|
||||
* gallery
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $gallery = null;
|
||||
|
||||
/**
|
||||
* seoImage1x1
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $seoImage1x1 = null;
|
||||
/**
|
||||
* seoImage4x3
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $seoImage4x3 = null;
|
||||
/**
|
||||
* seoImage16x9
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $seoImage16x9 = null;
|
||||
|
||||
/**
|
||||
* relCategory
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\Categories>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relCategory = null;
|
||||
|
||||
/**
|
||||
* relFilterValues
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\FilterValues>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relFilterValues = null;
|
||||
|
||||
/**
|
||||
* relIngredients
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Ingredients>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relIngredients = null;
|
||||
|
||||
|
||||
/**
|
||||
* relFilterValues
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\SelectableAttribute>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relSelectableattribute = null;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* relFilterValues
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\ProductVariantSizes>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relSizes = null;
|
||||
|
||||
/**
|
||||
* @var Products
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $product = null;
|
||||
|
||||
public function getProduct(): Products {
|
||||
|
||||
if ($this->product instanceof LazyLoadingProxy) {
|
||||
$this->product = $this->product->_loadRealInstance();
|
||||
}
|
||||
return $this->product;
|
||||
}
|
||||
|
||||
public function setProduct(Products $product): void {
|
||||
$this->product = $product;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the nr
|
||||
*
|
||||
* @return string $nr
|
||||
*/
|
||||
public function getNr() {
|
||||
return $this->nr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the nr
|
||||
*
|
||||
* @param string $nr
|
||||
* @return void
|
||||
*/
|
||||
public function setNr(string $nr) {
|
||||
$this->nr = $nr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the title
|
||||
*
|
||||
* @return string $title
|
||||
*/
|
||||
public function getTitle() {
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the title
|
||||
*
|
||||
* @param string $title
|
||||
* @return void
|
||||
*/
|
||||
public function setTitle(string $title) {
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the pathSegment
|
||||
*
|
||||
* @return string $pathSegment
|
||||
*/
|
||||
public function getPathSegment()
|
||||
{
|
||||
return $this->pathSegment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the pathSegment
|
||||
*
|
||||
* @param string $pathSegment
|
||||
* @return void
|
||||
*/
|
||||
public function setPathSegment($pathSegment)
|
||||
{
|
||||
$this->pathSegment = $pathSegment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description
|
||||
*
|
||||
* @return string $description
|
||||
*/
|
||||
public function getDescription() {
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the description
|
||||
*
|
||||
* @param string $description
|
||||
* @return void
|
||||
*/
|
||||
public function setDescription(string $description) {
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the tabIcon
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $tabIcon
|
||||
*/
|
||||
public function getTabIcon() {
|
||||
if ($this->tabIcon instanceof LazyLoadingProxy) {
|
||||
$this->tabIcon = $this->tabIcon->_loadRealInstance();
|
||||
}
|
||||
return $this->tabIcon;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the tabIcon
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $tabIcon
|
||||
* @return void
|
||||
*/
|
||||
public function setTabIcon(\TYPO3\CMS\Extbase\Domain\Model\FileReference $tabIcon) {
|
||||
$this->tabIcon = $tabIcon;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the image
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
|
||||
*/
|
||||
public function getImage() {
|
||||
if ($this->image instanceof LazyLoadingProxy) {
|
||||
$this->image = $this->image->_loadRealInstance();
|
||||
}
|
||||
return $this->image;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the image
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
|
||||
* @return void
|
||||
*/
|
||||
public function setImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) {
|
||||
$this->image = $image;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the images
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $images
|
||||
*/
|
||||
public function getImages() {
|
||||
return $this->images;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the images
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $images
|
||||
* @return void
|
||||
*/
|
||||
public function setImages(\TYPO3\CMS\Extbase\Domain\Model\FileReference $images) {
|
||||
$this->images = $images;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the gallery
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $gallery
|
||||
*/
|
||||
public function getGallery() {
|
||||
return $this->gallery;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the gallery
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $gallery
|
||||
* @return void
|
||||
*/
|
||||
public function setGallery(\TYPO3\CMS\Extbase\Domain\Model\FileReference $gallery) {
|
||||
$this->gallery = $gallery;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the seoImage1x1
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage1x1
|
||||
*/
|
||||
public function getSeoImage1x1() {
|
||||
if ($this->seoImage1x1 instanceof LazyLoadingProxy) {
|
||||
$this->seoImage1x1 = $this->seoImage1x1->_loadRealInstance();
|
||||
}
|
||||
return $this->seoImage1x1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the seoImage1x1
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage1x1
|
||||
* @return void
|
||||
*/
|
||||
public function setSeoImage1x1(\TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage1x1) {
|
||||
$this->seoImage1x1 = $seoImage1x1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the seoImage4x3
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage4x3
|
||||
*/
|
||||
public function getSeoImage4x3() {
|
||||
if ($this->seoImage4x3 instanceof LazyLoadingProxy) {
|
||||
$this->seoImage4x3 = $this->seoImage4x3->_loadRealInstance();
|
||||
}
|
||||
return $this->seoImage4x3;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the seoImage4x3
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage4x3
|
||||
* @return void
|
||||
*/
|
||||
public function setSeoImage4x3(\TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage4x3) {
|
||||
$this->seoImage4x3 = $seoImage4x3;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the seoImage16x9
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage16x9
|
||||
*/
|
||||
public function getSeoImage16x9() {
|
||||
if ($this->seoImage16x9 instanceof LazyLoadingProxy) {
|
||||
$this->seoImage16x9 = $this->seoImage16x9->_loadRealInstance();
|
||||
}
|
||||
return $this->seoImage16x9;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the seoImage16x9
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage16x9
|
||||
* @return void
|
||||
*/
|
||||
public function setSeoImage16x9(\TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage16x9) {
|
||||
$this->seoImage16x9 = $seoImage16x9;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* __construct
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
// Do not remove the next line: It would break the functionality
|
||||
$this->initializeObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes all ObjectStorage properties when model is reconstructed from DB (where __construct is not called)
|
||||
* Do not modify this method!
|
||||
* It will be rewritten on each save in the extension builder
|
||||
* You may modify the constructor of this class instead
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initializeObject() {
|
||||
$this->relCategory = $this->relCategory ?: new ObjectStorage();
|
||||
$this->relFilterValues = $this->relFilterValues ?: new ObjectStorage();
|
||||
$this->relIngredients = $this->relIngredients ?: new ObjectStorage();
|
||||
$this->relSelectableattribute = $this->relSelectableattribute ?: new ObjectStorage();
|
||||
$this->relSizes = $this->relSizes ?: new ObjectStorage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a Size
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\ProductVariantSizes $relSizes
|
||||
* @return void
|
||||
*/
|
||||
public function addRelSizes(\A2G\A2gProducts\Domain\Model\ProductVariantSizes $relSizes) {
|
||||
$this->relSizes->attach($relSizes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a Categories
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\Categories $relSizesToRemove The Categories to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeRelSizes(\A2G\A2gProducts\Domain\Model\ProductVariantSizes $relSizesToRemove) {
|
||||
$this->relSizes->detach($relSizesToRemove);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relSizes
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\ProductVariantSizes> $relSizes
|
||||
*/
|
||||
public function getRelSizes() {
|
||||
return $this->relSizes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relSizes
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\ProductVariantSizes> $relSizes
|
||||
* @return void
|
||||
*/
|
||||
public function setRelSizes(ObjectStorage $relSizes) {
|
||||
$this->relSizes = $relSizes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a Categories
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\Categories $relCategory
|
||||
* @return void
|
||||
*/
|
||||
public function addRelCategory(\A2G\A2gProducts\Domain\Model\Categories $relCategory) {
|
||||
$this->relCategory->attach($relCategory);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a Categories
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\Categories $relCategoryToRemove The Categories to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeRelCategory(\A2G\A2gProducts\Domain\Model\Categories $relCategoryToRemove) {
|
||||
$this->relCategory->detach($relCategoryToRemove);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relCategory
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\Categories> $relCategory
|
||||
*/
|
||||
public function getRelCategory() {
|
||||
return $this->relCategory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relCategory
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\Categories> $relCategory
|
||||
* @return void
|
||||
*/
|
||||
public function setRelCategory(ObjectStorage $relCategory) {
|
||||
$this->relCategory = $relCategory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a FilterValues
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\FilterValues $relFilterValue
|
||||
* @return void
|
||||
*/
|
||||
public function addRelFilterValue(\A2G\A2gProducts\Domain\Model\FilterValues $relFilterValue) {
|
||||
$this->relFilterValues->attach($relFilterValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a FilterValues
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\FilterValues $relFilterValueToRemove The FilterValues to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeRelFilterValue(\A2G\A2gProducts\Domain\Model\FilterValues $relFilterValueToRemove) {
|
||||
$this->relFilterValues->detach($relFilterValueToRemove);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relFilterValues
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\FilterValues> $relFilterValues
|
||||
*/
|
||||
public function getRelFilterValues() {
|
||||
return $this->relFilterValues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relFilterValues
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\FilterValues> $relFilterValues
|
||||
* @return void
|
||||
*/
|
||||
public function setRelFilterValues(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $relFilterValues) {
|
||||
$this->relFilterValues = $relFilterValues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a FilterValues
|
||||
*
|
||||
* @param Ingredients $relIngredients
|
||||
* @return void
|
||||
*/
|
||||
public function addRelIngredients(Ingredients $relIngredients) {
|
||||
$this->relIngredients->attach($relIngredients);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a FilterValues
|
||||
*
|
||||
* @param Ingredients $relIngredients The Ingredients to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeRelIngredients(Ingredients $relIngredients) {
|
||||
$this->relIngredients->detach($relIngredients);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relIngredients
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Ingredients> $relIngredients
|
||||
*/
|
||||
public function getRelIngredients() {
|
||||
return $this->relIngredients;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relIngredients
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Ingredients> $relIngredients
|
||||
* @return void
|
||||
*/
|
||||
public function setRelIngredients(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $relIngredients) {
|
||||
$this->relIngredients = $relIngredients;
|
||||
}
|
||||
/**
|
||||
* Adds a SelectableAttribute
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\SelectableAttribute $relSelectableattribute
|
||||
* @return void
|
||||
*/
|
||||
public function addRelSelectableattribute(\A2G\A2gProducts\Domain\Model\SelectableAttribute $relSelectableattribute) {
|
||||
$this->relSelectableattribute->attach($relSelectableattribute);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a SelectableAttribute
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\SelectableAttribute $relSelectableattributeToRemove The SelectableAttribute to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeRelSelectableattribute(\A2G\A2gProducts\Domain\Model\SelectableAttribute $relSelectableattributeToRemove) {
|
||||
$this->relSelectableattribute->detach($relSelectableattributeToRemove);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relSelectableAttribute
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\SelectableAttribute> $relSelectableattribute
|
||||
*/
|
||||
public function getRelSelectableattribute() {
|
||||
return $this->relSelectableattribute;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relSelectableAttribute
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\SelectableAttribute> $relSelectableattribute
|
||||
* @return void
|
||||
*/
|
||||
public function setRelSelectableattribute(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $relSelectableattribute) {
|
||||
$this->relSelectableattribute = $relSelectableattribute;
|
||||
}
|
||||
}
|
677
Classes/Domain/Model/Products.php
Executable file
677
Classes/Domain/Model/Products.php
Executable file
@ -0,0 +1,677 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Model;
|
||||
|
||||
use A2G\A2gProducts\Domain\Model\{
|
||||
Ingredients,
|
||||
ProductVariants,
|
||||
MasonryItem,
|
||||
Brands
|
||||
};
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\LazyLoadingProxy;
|
||||
|
||||
/**
|
||||
* This file is part of the "Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* Products
|
||||
*/
|
||||
class Products extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
|
||||
|
||||
/**
|
||||
* nr
|
||||
*
|
||||
* @var string
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
|
||||
*/
|
||||
protected $nr = '';
|
||||
|
||||
/**
|
||||
* title
|
||||
*
|
||||
* @var string
|
||||
* @TYPO3\CMS\Extbase\Annotation\Validate("NotEmpty")
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
/**
|
||||
* pathSegment
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $pathSegment = '';
|
||||
|
||||
/**
|
||||
* description
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = '';
|
||||
|
||||
/**
|
||||
* descriptionHtml
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $descriptionHtml = '';
|
||||
|
||||
/**
|
||||
* image
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $image = null;
|
||||
|
||||
/**
|
||||
* images
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\TYPO3\CMS\Extbase\Domain\Model\FileReference>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $images = null;
|
||||
|
||||
/**
|
||||
* gallery
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<MasonryItem>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $gallery = null;
|
||||
|
||||
|
||||
/**
|
||||
* seoImage1x1
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $seoImage1x1 = null;
|
||||
/**
|
||||
* seoImage4x3
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $seoImage4x3 = null;
|
||||
/**
|
||||
* seoImage16x9
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Domain\Model\FileReference
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $seoImage16x9 = null;
|
||||
|
||||
/**
|
||||
* relCategory
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\Categories>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relCategory = null;
|
||||
|
||||
/**
|
||||
* relFilterValues
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\FilterValues>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relFilterValues = null;
|
||||
|
||||
/**
|
||||
* relIngredients
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Ingredients>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relIngredients = null;
|
||||
|
||||
/**
|
||||
* relProductvariants
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<ProductVariants>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relProductvariants = null;
|
||||
|
||||
/**
|
||||
* relFilterValues
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\SelectableAttribute>
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Cascade("remove")
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relSelectableattribute = null;
|
||||
|
||||
/**
|
||||
* relBrand
|
||||
*
|
||||
* @var Brands
|
||||
* @TYPO3\CMS\Extbase\Annotation\ORM\Lazy
|
||||
*/
|
||||
protected $relBrand = null;
|
||||
|
||||
/**
|
||||
* Returns the nr
|
||||
*
|
||||
* @return string $nr
|
||||
*/
|
||||
public function getNr() {
|
||||
return $this->nr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the nr
|
||||
*
|
||||
* @param string $nr
|
||||
* @return void
|
||||
*/
|
||||
public function setNr(string $nr) {
|
||||
$this->nr = $nr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the title
|
||||
*
|
||||
* @return string $title
|
||||
*/
|
||||
public function getTitle() {
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the title
|
||||
*
|
||||
* @param string $title
|
||||
* @return void
|
||||
*/
|
||||
public function setTitle(string $title) {
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the pathSegment
|
||||
*
|
||||
* @return string $pathSegment
|
||||
*/
|
||||
public function getPathSegment() {
|
||||
return $this->pathSegment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the pathSegment
|
||||
*
|
||||
* @param string $pathSegment
|
||||
* @return void
|
||||
*/
|
||||
public function setPathSegment($pathSegment) {
|
||||
$this->pathSegment = $pathSegment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the description
|
||||
*
|
||||
* @return string $description
|
||||
*/
|
||||
public function getDescription() {
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the description
|
||||
*
|
||||
* @param string $description
|
||||
* @return void
|
||||
*/
|
||||
public function setDescription(string $description) {
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
public function getDescriptionHtml(): string {
|
||||
return $this->descriptionHtml;
|
||||
}
|
||||
|
||||
public function setDescriptionHtml(string $descriptionHtml): void {
|
||||
$this->descriptionHtml = $descriptionHtml;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the image
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
|
||||
*/
|
||||
public function getImage() {
|
||||
if ($this->image instanceof LazyLoadingProxy) {
|
||||
$this->image = $this->image->_loadRealInstance();
|
||||
}
|
||||
return $this->image;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the image
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $image
|
||||
* @return void
|
||||
*/
|
||||
public function setImage(\TYPO3\CMS\Extbase\Domain\Model\FileReference $image) {
|
||||
$this->image = $image;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the images
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $images
|
||||
*/
|
||||
public function getImages() {
|
||||
return $this->images;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the images
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $images
|
||||
* @return void
|
||||
*/
|
||||
public function setImages(\TYPO3\CMS\Extbase\Domain\Model\FileReference $images) {
|
||||
$this->images = $images;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the gallery
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $gallery
|
||||
*/
|
||||
public function getGallery() {
|
||||
return $this->gallery;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the gallery
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $gallery
|
||||
* @return void
|
||||
*/
|
||||
public function setGallery(\TYPO3\CMS\Extbase\Domain\Model\FileReference $gallery) {
|
||||
$this->gallery = $gallery;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the seoImage1x1
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage1x1
|
||||
*/
|
||||
public function getSeoImage1x1() {
|
||||
if ($this->seoImage1x1 instanceof LazyLoadingProxy) {
|
||||
$this->seoImage1x1 = $this->seoImage1x1->_loadRealInstance();
|
||||
}
|
||||
return $this->seoImage1x1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the seoImage1x1
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage1x1
|
||||
* @return void
|
||||
*/
|
||||
public function setSeoImage1x1(\TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage1x1) {
|
||||
$this->seoImage1x1 = $seoImage1x1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the seoImage4x3
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage4x3
|
||||
*/
|
||||
public function getSeoImage4x3() {
|
||||
if ($this->seoImage4x3 instanceof LazyLoadingProxy) {
|
||||
$this->seoImage4x3 = $this->seoImage4x3->_loadRealInstance();
|
||||
}
|
||||
return $this->seoImage4x3;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the seoImage4x3
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage4x3
|
||||
* @return void
|
||||
*/
|
||||
public function setSeoImage4x3(\TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage4x3) {
|
||||
$this->seoImage4x3 = $seoImage4x3;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the seoImage16x9
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage16x9
|
||||
*/
|
||||
public function getSeoImage16x9() {
|
||||
if ($this->seoImage16x9 instanceof LazyLoadingProxy) {
|
||||
$this->seoImage16x9 = $this->seoImage16x9->_loadRealInstance();
|
||||
}
|
||||
return $this->seoImage16x9;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the seoImage16x9
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage16x9
|
||||
* @return void
|
||||
*/
|
||||
public function setSeoImage16x9(\TYPO3\CMS\Extbase\Domain\Model\FileReference $seoImage16x9) {
|
||||
$this->seoImage16x9 = $seoImage16x9;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* __construct
|
||||
*/
|
||||
public function __construct() {
|
||||
|
||||
// Do not remove the next line: It would break the functionality
|
||||
$this->initializeObject();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes all ObjectStorage properties when model is reconstructed from DB (where __construct is not called)
|
||||
* Do not modify this method!
|
||||
* It will be rewritten on each save in the extension builder
|
||||
* You may modify the constructor of this class instead
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function initializeObject() {
|
||||
$this->relCategory = $this->relCategory ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
$this->relFilterValues = $this->relFilterValues ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
$this->relIngredients = $this->relIngredients ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
$this->relSelectableattribute = $this->relSelectableattribute ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
$this->relProductvariants = $this->relProductvariants ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
$this->gallery = $this->gallery ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
// $this->relBrand = $this->relBrand ?: new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a Categories
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\Categories $relCategory
|
||||
* @return void
|
||||
*/
|
||||
public function addRelCategory(\A2G\A2gProducts\Domain\Model\Categories $relCategory) {
|
||||
$this->relCategory->attach($relCategory);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a Categories
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\Categories $relCategoryToRemove The Categories to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeRelCategory(\A2G\A2gProducts\Domain\Model\Categories $relCategoryToRemove) {
|
||||
$this->relCategory->detach($relCategoryToRemove);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relCategory
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\Categories> $relCategory
|
||||
*/
|
||||
public function getRelCategory() {
|
||||
return $this->relCategory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relCategory
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\Categories> $relCategory
|
||||
* @return void
|
||||
*/
|
||||
public function setRelCategory(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $relCategory) {
|
||||
$this->relCategory = $relCategory;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a FilterValues
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\FilterValues $relFilterValue
|
||||
* @return void
|
||||
*/
|
||||
public function addRelFilterValue(\A2G\A2gProducts\Domain\Model\FilterValues $relFilterValue) {
|
||||
$this->relFilterValues->attach($relFilterValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a FilterValues
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\FilterValues $relFilterValueToRemove The FilterValues to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeRelFilterValue(\A2G\A2gProducts\Domain\Model\FilterValues $relFilterValueToRemove) {
|
||||
$this->relFilterValues->detach($relFilterValueToRemove);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relFilterValues
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\FilterValues> $relFilterValues
|
||||
*/
|
||||
public function getRelFilterValues() {
|
||||
return $this->relFilterValues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relFilterValues
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\FilterValues> $relFilterValues
|
||||
* @return void
|
||||
*/
|
||||
public function setRelFilterValues(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $relFilterValues) {
|
||||
$this->relFilterValues = $relFilterValues;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a SelectableAttribute
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\SelectableAttribute $relSelectableattribute
|
||||
* @return void
|
||||
*/
|
||||
public function addRelSelectableattribute(\A2G\A2gProducts\Domain\Model\SelectableAttribute $relSelectableattribute) {
|
||||
$this->relSelectableattribute->attach($relSelectableattribute);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a SelectableAttribute
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\SelectableAttribute $relSelectableattributeToRemove The SelectableAttribute to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeRelSelectableattribute(\A2G\A2gProducts\Domain\Model\SelectableAttribute $relSelectableattributeToRemove) {
|
||||
$this->relSelectableattribute->detach($relSelectableattributeToRemove);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relSelectableAttribute
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\SelectableAttribute> $relSelectableattribute
|
||||
*/
|
||||
public function getRelSelectableattribute() {
|
||||
return $this->relSelectableattribute;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relSelectableAttribute
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\A2G\A2gProducts\Domain\Model\SelectableAttribute> $relSelectableattribute
|
||||
* @return void
|
||||
*/
|
||||
public function setRelSelectableattribute(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $relSelectableattribute) {
|
||||
$this->relSelectableattribute = $relSelectableattribute;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a FilterValues
|
||||
*
|
||||
* @param Ingredients $relIngredients
|
||||
* @return void
|
||||
*/
|
||||
public function addRelIngredients(Ingredients $relIngredients) {
|
||||
$this->relIngredients->attach($relIngredients);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a FilterValues
|
||||
*
|
||||
* @param Ingredients $relIngredients The Ingredients to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeRelIngredients(Ingredients $relIngredients) {
|
||||
$this->relIngredients->detach($relIngredients);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relIngredients
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Ingredients> $relIngredients
|
||||
*/
|
||||
public function getRelIngredients() {
|
||||
return $this->relIngredients;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relIngredients
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<Ingredients> $relIngredients
|
||||
* @return void
|
||||
*/
|
||||
public function setRelIngredients(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $relIngredients) {
|
||||
$this->relIngredients = $relIngredients;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a MasonryItem
|
||||
*
|
||||
* @param MasonryItem $relMasonryItem
|
||||
* @return void
|
||||
*/
|
||||
public function addGallerys(MasonryItem $relMasonryItem) {
|
||||
$this->gallery->attach($relMasonryItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a MasonryItem
|
||||
*
|
||||
* @param MasonryItem $relMasonryItem The MasonryItem to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeGallerys(MasonryItem $relMasonryItem) {
|
||||
$this->gallery->detach($relMasonryItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the gallery
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<MasonryItem> $gallery
|
||||
*/
|
||||
public function getGallerys() {
|
||||
return $this->gallery;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the gallery
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<MasonryItem> $gallery
|
||||
* @return void
|
||||
*/
|
||||
public function setGallerys(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $gallery) {
|
||||
$this->gallery = $gallery;
|
||||
}
|
||||
|
||||
//
|
||||
// public function getRelProductvariants() {
|
||||
// return $this->relProductvariants;
|
||||
// }
|
||||
//
|
||||
// public function setRelProductvariants($relProductvariants): void {
|
||||
// $this->relProductvariants = $relProductvariants;
|
||||
// }
|
||||
//
|
||||
//
|
||||
|
||||
/**
|
||||
* Adds a FilterValues
|
||||
*
|
||||
* @param ProductVariants $relProductvariants
|
||||
* @return void
|
||||
*/
|
||||
public function addRelProductvariants($relProductvariants) {
|
||||
$this->relProductvariants->attach($relProductvariants);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a FilterValues
|
||||
*
|
||||
* @param ProductVariants $relProductvariants The ProductVariants to be removed
|
||||
* @return void
|
||||
*/
|
||||
public function removeRelProductvariants($relProductvariants) {
|
||||
$this->relProductvariants->detach($relProductvariants);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relProductvariants
|
||||
*
|
||||
* @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<ProductVariants> $relProductvariants
|
||||
*/
|
||||
public function getRelProductvariants() {
|
||||
return $this->relProductvariants;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relProductvariants
|
||||
*
|
||||
* @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage<ProductVariants> $relProductvariants
|
||||
* @return void
|
||||
*/
|
||||
public function setRelProductvariants(\TYPO3\CMS\Extbase\Persistence\ObjectStorage $relProductvariants) {
|
||||
$this->relProductvariants = $relProductvariants;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relBrand
|
||||
*
|
||||
* @return Brands|null
|
||||
*/
|
||||
public function getRelBrand():?Brands {
|
||||
if ($this->relBrand instanceof LazyLoadingProxy) {
|
||||
$this->relBrand = $this->relBrand->_loadRealInstance();
|
||||
}
|
||||
return $this->relBrand;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relBrand
|
||||
*
|
||||
* @param Brands|null $relBrand
|
||||
* @return void
|
||||
*/
|
||||
public function setRelBrand(?Brands $relBrand) {
|
||||
$this->relBrand = $relBrand;
|
||||
}
|
||||
}
|
87
Classes/Domain/Model/SelectableAttribute.php
Executable file
87
Classes/Domain/Model/SelectableAttribute.php
Executable file
@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Model;
|
||||
|
||||
/**
|
||||
* This file is part of the "altogether Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* SelectableAttribute
|
||||
*/
|
||||
class SelectableAttribute extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
|
||||
|
||||
/**
|
||||
* relFilterOptions
|
||||
*
|
||||
* @var \A2G\A2gProducts\Domain\Model\FilterOptions
|
||||
*/
|
||||
protected $relFilterOption = null;
|
||||
|
||||
/**
|
||||
* relFilters
|
||||
*
|
||||
* @var \A2G\A2gProducts\Domain\Model\Filters
|
||||
*/
|
||||
protected $relFilters = null;
|
||||
|
||||
/**
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $title = '';
|
||||
|
||||
/**
|
||||
* Returns the relFilterOption
|
||||
*
|
||||
* @return \A2G\A2gProducts\Domain\Model\FilterOptions $relFilterOption
|
||||
*/
|
||||
public function getRelFilterOption() {
|
||||
return $this->relFilterOption;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relFilterOption
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\FilterOptions $relFilterOptio
|
||||
* @return void
|
||||
*/
|
||||
public function setRelFilterOption(\A2G\A2gProducts\Domain\Model\FilterOptions $relFilterOptions) {
|
||||
$this->relFilterOption = $relFilterOption;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the relFilters
|
||||
*
|
||||
* @return \A2G\A2gProducts\Domain\Model\Filters $relFilters
|
||||
*/
|
||||
public function getRelFilters() {
|
||||
return $this->relFilters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relFilters
|
||||
*
|
||||
* @param \A2G\A2gProducts\Domain\Model\Filters $relFilters
|
||||
* @return void
|
||||
*/
|
||||
public function setRelFilters(\A2G\A2gProducts\Domain\Model\Filters $relFilters) {
|
||||
$this->relFilters = $relFilters;
|
||||
}
|
||||
|
||||
public function getTitle(): string {
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
public function setTitle(string $title): void {
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
}
|
43
Classes/Domain/Repository/CategoriesRepository.php
Executable file
43
Classes/Domain/Repository/CategoriesRepository.php
Executable file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Repository;
|
||||
|
||||
/* * *
|
||||
*
|
||||
* This file is part of the "WebX GS Map" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2019 Raphael Martin <raphael@web-crossing.com>, web-crossing gmbh
|
||||
*
|
||||
* * */
|
||||
|
||||
/**
|
||||
* The repository for Categories
|
||||
*/
|
||||
class CategoriesRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $defaultOrderings = [
|
||||
'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
|
||||
];
|
||||
|
||||
/**
|
||||
* @param array $uids
|
||||
*/
|
||||
public function findByUids(array $uids = []) {
|
||||
if (!empty($uids)) {
|
||||
$query = $this->createQuery();
|
||||
$constraints = [];
|
||||
$constraints[] = $query->in('uid', $uids);
|
||||
$query->matching($query->logicalAnd($constraints));
|
||||
return $query->execute();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
30
Classes/Domain/Repository/FilterOptionsRepository.php
Executable file
30
Classes/Domain/Repository/FilterOptionsRepository.php
Executable file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Repository;
|
||||
|
||||
|
||||
/* * *
|
||||
*
|
||||
* This file is part of the "WebX GS Map" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2019 Raphael Martin <raphael@web-crossing.com>, web-crossing gmbh
|
||||
*
|
||||
* * */
|
||||
|
||||
/**
|
||||
* The repository for FilterOptions
|
||||
*/
|
||||
class FilterOptionsRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $defaultOrderings = [
|
||||
'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
|
||||
];
|
||||
}
|
51
Classes/Domain/Repository/FiltersRepository.php
Executable file
51
Classes/Domain/Repository/FiltersRepository.php
Executable file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Context\Context;
|
||||
|
||||
/**
|
||||
* This file is part of the "Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* The repository for Products
|
||||
*/
|
||||
class FiltersRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
||||
protected $defaultOrderings = [
|
||||
'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
|
||||
];
|
||||
|
||||
/**
|
||||
* @param array $categoryUids
|
||||
*/
|
||||
public function getFromCategories(array $categoryUids = []) {
|
||||
$languageAspect = GeneralUtility::makeInstance(Context::class)->getAspect('language');
|
||||
$sys_language_uid = $languageAspect->getId();
|
||||
|
||||
$query = $this->createQuery();
|
||||
$sql = 'SELECT DISTINCT fT.* FROM tx_a2gproducts_domain_model_filters AS fT '
|
||||
. 'JOIN tx_a2gproducts_categories_filters_mm AS mmT ON mmT.uid_foreign = fT.uid'
|
||||
. ' WHERE fT.hidden=0 AND fT.deleted=0 '
|
||||
. (empty($categoryUids) ? '' :'AND mmT.uid_local IN (' . implode(',', $categoryUids ) . ') ')
|
||||
. 'AND fT.sys_language_uid IN (:dcSysLanguageUid, -1) ORDER BY fT.sorting';
|
||||
$arguments = [
|
||||
':dcSysLanguageUid' => $sys_language_uid
|
||||
];
|
||||
$query->statement($sql, $arguments);
|
||||
return $query->execute();
|
||||
}
|
||||
|
||||
}
|
33
Classes/Domain/Repository/IngredientsRepository.php
Executable file
33
Classes/Domain/Repository/IngredientsRepository.php
Executable file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Repository;
|
||||
|
||||
/**
|
||||
* This file is part of the "Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* The repository for Ingredients
|
||||
*/
|
||||
class IngredientsRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $defaultOrderings = [
|
||||
'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
|
||||
];
|
||||
|
||||
public function initializeObject() {
|
||||
$querySettings = $this->objectManager->get(\TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings::class);
|
||||
$querySettings->setRespectStoragePage(false);
|
||||
$this->setDefaultQuerySettings($querySettings);
|
||||
}
|
||||
}
|
27
Classes/Domain/Repository/ProductVariantsRepository.php
Executable file
27
Classes/Domain/Repository/ProductVariantsRepository.php
Executable file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Repository;
|
||||
|
||||
/**
|
||||
* This file is part of the "Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* The repository for ProductVariants
|
||||
*/
|
||||
class ProductVariantsRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $defaultOrderings = [
|
||||
'sorting' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING
|
||||
];
|
||||
}
|
204
Classes/Domain/Repository/ProductsRepository.php
Executable file
204
Classes/Domain/Repository/ProductsRepository.php
Executable file
@ -0,0 +1,204 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Context\Context;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\QueryResult;
|
||||
use A2G\A2gProducts\Domain\Model\Filters;
|
||||
use A2G\A2gProducts\Domain\Traits\{
|
||||
InjectFiltersRepositoryTrait,
|
||||
InjectFilterOptionsRepositoryTrait
|
||||
};
|
||||
|
||||
/**
|
||||
* This file is part of the "Products" Extension for TYPO3 CMS.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* (c) 2021 Raphael Martin <raphy.martin@gmail.com>, none
|
||||
*/
|
||||
|
||||
/**
|
||||
* The repository for Products
|
||||
*/
|
||||
class ProductsRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
|
||||
|
||||
use InjectFiltersRepositoryTrait;
|
||||
use InjectFilterOptionsRepositoryTrait;
|
||||
|
||||
/**
|
||||
* @param array $categoryUids
|
||||
*/
|
||||
public function getFromCategories(array $categoryUids, int $limit = 0, int $offset = 0, array $excludeProduct = [], bool $random = false) {
|
||||
if (!empty($categoryUids)) {
|
||||
$languageAspect = GeneralUtility::makeInstance(Context::class)->getAspect('language');
|
||||
$sys_language_uid = $languageAspect->getId();
|
||||
$query = $this->createQuery();
|
||||
|
||||
$sql = ' SELECT DISTINCT pT.* FROM tx_a2gproducts_domain_model_products AS pT '
|
||||
. 'JOIN tx_a2gproducts_domain_model_productvariants AS pvT ON pvT.product = pT.uid '
|
||||
. 'JOIN tx_a2gproducts_products_categories_mm AS mmT ON mmT.uid_local = pT.uid ';
|
||||
$sqlWhere = ' WHERE pT.hidden=0 AND pT.deleted=0 AND pvT.hidden=0 AND pvT.deleted=0 AND mmT.uid_foreign IN (' . implode(',', $categoryUids) . ') AND pT.sys_language_uid IN (-1, :dcSysLangUid) ';
|
||||
$arguments = [
|
||||
':dcSysLangUid' => $sys_language_uid
|
||||
];
|
||||
|
||||
if (!empty($excludeProduct)) {
|
||||
$sqlWhere .= ' AND pT.uid NOT IN (' . implode(',', $excludeProduct) . ') ';
|
||||
}
|
||||
|
||||
if ($random) {
|
||||
$sqlWhere .= ' ORDER BY RAND() ';
|
||||
} else {
|
||||
$sqlWhere .= ' ORDER BY pT.sorting ';
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($limit > 0) {
|
||||
$sqlWhere .= ' LIMIT :dcLimit ';
|
||||
$arguments[':dcLimit'] = $limit;
|
||||
}
|
||||
if ($offset > 0) {
|
||||
$sqlWhere .= ' OFFSET :dcOffset ';
|
||||
$arguments[':dcOffset'] = $offset;
|
||||
}
|
||||
|
||||
$query->statement($sql . $sqlWhere, $arguments);
|
||||
return $query->execute();
|
||||
} else {
|
||||
return $this->findAll();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param array $categoryUids
|
||||
* @param array $mainFilter
|
||||
* @param string $search
|
||||
* @param int $limit
|
||||
* @param int $offset
|
||||
* @param QueryResult $filters
|
||||
* @param bool $random
|
||||
* @return QueryResult
|
||||
*/
|
||||
public function filter(array $categoryUids, array $mainFilter = [], string $search = '', int $limit = 0, int $offset = 0, QueryResult $filters = null, bool $random = false): QueryResult {
|
||||
$languageAspect = GeneralUtility::makeInstance(Context::class)->getAspect('language');
|
||||
$sys_language_uid = $languageAspect->getId();
|
||||
|
||||
$query = $this->createQuery();
|
||||
$sql = 'SELECT DISTINCT pT.* FROM tx_a2gproducts_domain_model_products AS pT '
|
||||
. 'JOIN tx_a2gproducts_domain_model_productvariants AS pvT ON pvT.product = pT.uid '
|
||||
. 'JOIN tx_a2gproducts_products_categories_mm AS mmT ON mmT.uid_local = pT.uid ';
|
||||
$sqlWhere = 'WHERE pT.hidden=0 AND pT.deleted=0 AND pvT.hidden=0 AND pvT.deleted=0 AND pT.sys_language_uid IN (:dcSysLangUid,-1) ';
|
||||
if(!empty($categoryUids)){
|
||||
$sqlWhere .= 'AND mmT.uid_foreign IN (' . implode(',', $categoryUids) . ') ';
|
||||
}
|
||||
$arguments = [
|
||||
':dcSysLangUid' => $sys_language_uid
|
||||
];
|
||||
|
||||
if (trim($search) !== '') {
|
||||
$sqlWhere .= 'AND pT.title LIKE :dcSearch ';
|
||||
$arguments[':dcSearch'] = '%' . $search . '%';
|
||||
}
|
||||
|
||||
$filtersSortet = [];
|
||||
foreach ($filters as $filter) {
|
||||
$filtersSortet[$filter->getUid()] = $filter;
|
||||
}
|
||||
$x = 1;
|
||||
$i = 0;
|
||||
|
||||
$sql1 = ' ';
|
||||
$sqlWhere1 = ' ';
|
||||
|
||||
foreach ($mainFilter AS $key => $filter) {
|
||||
if($filtersSortet[$key] === null){
|
||||
$mainFilter[$key] = null;
|
||||
}
|
||||
}
|
||||
$mainFilter = array_filter($mainFilter);
|
||||
if (!empty($mainFilter)) {
|
||||
$sqlWhere .= ' AND ( ';
|
||||
foreach ($mainFilter AS $key => $filter) {
|
||||
$i = 0;
|
||||
if ($x > 1) {
|
||||
$sqlWhere .= ' AND ';
|
||||
}
|
||||
$sqlWhere .= ' ( ';
|
||||
// $sqlWhere1 .= ' ( ';
|
||||
if (!empty($filter)) {
|
||||
foreach ($filter AS $kay => $opt) {
|
||||
if ($i > 0) {
|
||||
$sqlWhere .= ' OR ';
|
||||
} else {
|
||||
// $sqlWhere .= ' ( fv' . $x . 'T.hidden = 0 OR fvpv' . $x . 'T.hidden = 0 OR sav' . $x . 'T.hidden = 0 OR savpv' . $x . 'T.hidden = 0 ) AND ( ';
|
||||
}
|
||||
$filterOpt = $this->filteroptionRepository->findByUid((int) $kay);
|
||||
switch ($filtersSortet[$key]->getFilterType()) {
|
||||
case 1:
|
||||
// 'range ( uses min and max value )'
|
||||
$sqlWhere .= ' ( fv' . $x . 'T.value ' . Filters::$dbOperations[$filtersSortet[$key]->getDbOperationMin()] . ' ' . $filterOpt->getValueMin() . ' ';
|
||||
if ($filterOpt->getValueMax() > 0) {
|
||||
$sqlWhere .= ' AND fv' . $x . 'T.value ' . Filters::$dbOperations[$filtersSortet[$key]->getDbOperationMax()] . ' ' . $filterOpt->getValueMax();
|
||||
}
|
||||
$sqlWhere .= ' ) ';
|
||||
break;
|
||||
case 2:
|
||||
// 'compare ( uses just min value )'
|
||||
if (Filters::$dbOperations[$filtersSortet[$key]->getDbOperationMin()] === 'IN') {
|
||||
$sqlWhere .= '( fv' . $x . 'T.value IN (' . $filterOpt->getValueMin() . ' ) ';
|
||||
} else {
|
||||
$sqlWhere .= '( fv' . $x . 'T.value ' . Filters::$dbOperations[$filtersSortet[$key]->getDbOperationMin()] . ' ' . $filterOpt->getValueMin() . ' ) ';
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
// uses no value
|
||||
$sqlWhere .= '( '
|
||||
. '( fv' . $x . 'T.rel_filter_option = ' . (int) $kay . ' AND fv' . $x . 'T.hidden = 0 ) '
|
||||
. 'OR ( fvpv' . $x . 'T.rel_filter_option = ' . (int) $kay . ' AND fvpv' . $x . 'T.hidden = 0 ) '
|
||||
// . 'OR ( sav' . $x . 'T.rel_filter_option = ' . (int) $kay . ' AND sav' . $x . 'T.hidden = 0 ) '
|
||||
. 'OR ( savpv' . $x . 'T.rel_filter_option = ' . (int) $kay . ' AND savpv' . $x . 'T.hidden = 0 ) '
|
||||
. ') ';
|
||||
break;
|
||||
}
|
||||
$i = 1;
|
||||
}
|
||||
|
||||
// $sqlWhere .= ' ) ';
|
||||
}
|
||||
$sql .= 'LEFT JOIN tx_a2gproducts_domain_model_filtervalues AS fv' . $x . 'T ON fv' . $x . 'T.products = pT.uid '
|
||||
. 'LEFT JOIN tx_a2gproducts_domain_model_filtervalues AS fvpv' . $x . 'T ON fvpv' . $x . 'T.productvariants = pvT.uid '
|
||||
// . 'LEFT JOIN tx_a2gproducts_domain_model_selectableattribute AS sav' . $x . 'T ON sav' . $x . 'T.products = pT.uid '
|
||||
. 'LEFT JOIN tx_a2gproducts_domain_model_selectableattribute AS savpv' . $x . 'T ON savpv' . $x . 'T.productvariants = pvT.uid ';
|
||||
$arguments[':dcKey' . $x] = (int) $key;
|
||||
$x = $x + 1;
|
||||
$sqlWhere .= ' ) ';
|
||||
}
|
||||
$sqlWhere .= ' ) ';
|
||||
}
|
||||
|
||||
if ($random) {
|
||||
$sqlWhere .= ' ORDER BY RAND()';
|
||||
} else {
|
||||
$sqlWhere .= ' ORDER BY pT.sorting';
|
||||
}
|
||||
|
||||
if ($limit > 0) {
|
||||
$sqlWhere .= ' LIMIT :dcLimit ';
|
||||
$arguments[':dcLimit'] = $limit;
|
||||
}
|
||||
if ($offset > 0) {
|
||||
$sqlWhere .= ' OFFSET :dcOffset ';
|
||||
$arguments[':dcOffset'] = $offset;
|
||||
}
|
||||
$query->statement($sql . $sqlWhere, $arguments);
|
||||
return $query->execute();
|
||||
}
|
||||
|
||||
}
|
32
Classes/Domain/Traits/InjectCategoriesRepositoryTrait.php
Executable file
32
Classes/Domain/Traits/InjectCategoriesRepositoryTrait.php
Executable file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
|
||||
*/
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Traits;
|
||||
|
||||
use A2G\A2gProducts\Domain\Repository\CategoriesRepository;
|
||||
|
||||
/**
|
||||
* Description of InjectCategoriesRepositoryTrait
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
trait InjectCategoriesRepositoryTrait {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var CategoriesRepository
|
||||
*/
|
||||
protected $categoriesRepository = null;
|
||||
|
||||
/**
|
||||
* @param CategoriesRepository $categoriesRepository
|
||||
*/
|
||||
public function injectCategoriesRepository(CategoriesRepository $categoriesRepository) {
|
||||
$this->categoriesRepository = $categoriesRepository;
|
||||
}
|
||||
|
||||
}
|
33
Classes/Domain/Traits/InjectContentObjectRendererTrait.php
Executable file
33
Classes/Domain/Traits/InjectContentObjectRendererTrait.php
Executable file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
|
||||
*/
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Traits;
|
||||
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
|
||||
/**
|
||||
* Description of InjectContentObjectRendererTrait
|
||||
*
|
||||
* @author raphy
|
||||
*/
|
||||
class InjectContentObjectRendererTrait {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var ContentObjectRenderer
|
||||
*/
|
||||
protected $contentObjectRenderer;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ContentObjectRenderer $contentObjectRenderer
|
||||
*/
|
||||
public function injectContentObjectRenderer(ContentObjectRenderer $contentObjectRenderer)
|
||||
{
|
||||
$this->contentObjectRenderer = $contentObjectRenderer;
|
||||
}
|
||||
}
|
35
Classes/Domain/Traits/InjectFilterOptionsRepositoryTrait.php
Executable file
35
Classes/Domain/Traits/InjectFilterOptionsRepositoryTrait.php
Executable file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
|
||||
*/
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Traits;
|
||||
|
||||
use A2G\A2gProducts\Domain\Repository\FilterOptionsRepository;
|
||||
|
||||
/**
|
||||
* Description of InjectFilterOptionsRepositoryTrait
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
trait InjectFilterOptionsRepositoryTrait {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var FilterOptionsRepository
|
||||
*/
|
||||
protected $filteroptionRepository = null;
|
||||
|
||||
|
||||
/**
|
||||
* @param FilterOptionsRepository $filteroptionRepository
|
||||
*/
|
||||
public function injectFilterOptionsRepository(FilterOptionsRepository $filteroptionRepository) {
|
||||
$this->filteroptionRepository = $filteroptionRepository;
|
||||
}
|
||||
|
||||
}
|
31
Classes/Domain/Traits/InjectFiltersRepositoryTrait.php
Executable file
31
Classes/Domain/Traits/InjectFiltersRepositoryTrait.php
Executable file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
|
||||
*/
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Traits;
|
||||
|
||||
use A2G\A2gProducts\Domain\Repository\FiltersRepository;
|
||||
|
||||
/**
|
||||
* Description of InjectFiltersRepositoryTrait
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
trait InjectFiltersRepositoryTrait {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var FiltersRepository
|
||||
*/
|
||||
protected $filtersRepository = null;
|
||||
|
||||
/**
|
||||
* @param FiltersRepository $filtersRepository
|
||||
*/
|
||||
public function injectFiltersRepository(FiltersRepository $filtersRepository) {
|
||||
$this->filtersRepository = $filtersRepository;
|
||||
}
|
||||
}
|
35
Classes/Domain/Traits/InjectImageServiceTrait.php
Executable file
35
Classes/Domain/Traits/InjectImageServiceTrait.php
Executable file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Traits;
|
||||
|
||||
use TYPO3\CMS\Extbase\Service\ImageService;
|
||||
|
||||
/**
|
||||
* Description of InjectImageServiceTrait
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
trait InjectImageServiceTrait {
|
||||
|
||||
/**
|
||||
* imageService
|
||||
*
|
||||
* @var ImageService
|
||||
*/
|
||||
protected $imageService = null;
|
||||
/**
|
||||
* @param ImageService $imageService
|
||||
*/
|
||||
public function injectImageService(ImageService $imageService) {
|
||||
$this->imageService = $imageService;
|
||||
}
|
||||
|
||||
}
|
27
Classes/Domain/Traits/InjectIngredientsRepositoryTrait.php
Executable file
27
Classes/Domain/Traits/InjectIngredientsRepositoryTrait.php
Executable file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Traits;
|
||||
|
||||
use A2G\A2gProducts\Domain\Repository\IngredientsRepository;
|
||||
|
||||
/**
|
||||
* Description of InjectIngredientsRepositoryTrait
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
trait InjectIngredientsRepositoryTrait {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var IngredientsRepository
|
||||
*/
|
||||
protected $ingredientsRepository = null;
|
||||
|
||||
/**
|
||||
* @param IngredientsRepository $ingredientsRepository
|
||||
*/
|
||||
public function injectIngredientsRepository(IngredientsRepository $ingredientsRepository) {
|
||||
$this->ingredientsRepository = $ingredientsRepository;
|
||||
}
|
||||
|
||||
}
|
32
Classes/Domain/Traits/InjectProductsRepositoryTrait.php
Executable file
32
Classes/Domain/Traits/InjectProductsRepositoryTrait.php
Executable file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Scripting/PHPClass.php to edit this template
|
||||
*/
|
||||
|
||||
namespace A2G\A2gProducts\Domain\Traits;
|
||||
|
||||
use A2G\A2gProducts\Domain\Repository\ProductsRepository;
|
||||
|
||||
/**
|
||||
* Description of InjectProductsRepositoryTrait
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
trait InjectProductsRepositoryTrait {
|
||||
|
||||
/**
|
||||
*
|
||||
* @var ProductsRepository
|
||||
*/
|
||||
protected $productsRepository = null;
|
||||
|
||||
/**
|
||||
* @param ProductsRepository $productsRepository
|
||||
*/
|
||||
public function injectProductsRepository(ProductsRepository $productsRepository) {
|
||||
$this->productsRepository = $productsRepository;
|
||||
}
|
||||
|
||||
}
|
51
Classes/Hreflang/EventListener/ProductsHrefLang.php
Executable file
51
Classes/Hreflang/EventListener/ProductsHrefLang.php
Executable file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Hreflang\EventListener;
|
||||
|
||||
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
|
||||
use TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor;
|
||||
use TYPO3\CMS\Frontend\Event\ModifyHrefLangTagsEvent;
|
||||
|
||||
/**
|
||||
* Description of ProductsHrefLang
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
class ProductsHrefLang {
|
||||
|
||||
|
||||
/** @var ContentObjectRenderer */
|
||||
public $cObj;
|
||||
|
||||
/** @var LanguageMenuProcessor */
|
||||
protected $languageMenuProcessor;
|
||||
|
||||
public function __construct(ContentObjectRenderer $cObj, LanguageMenuProcessor $languageMenuProcessor)
|
||||
{
|
||||
$this->cObj = $cObj;
|
||||
$this->languageMenuProcessor = $languageMenuProcessor;
|
||||
}
|
||||
|
||||
|
||||
public function __invoke(ModifyHrefLangTagsEvent $event): void
|
||||
{
|
||||
$hrefLangs = $event->getHrefLangs();
|
||||
$request = $event->getRequest();
|
||||
|
||||
// Do anything you want with $hrefLangs
|
||||
$hrefLangs = [
|
||||
'en-US' => 'https://example.com',
|
||||
'nl-NL' => 'https://example.com/nl'
|
||||
];
|
||||
|
||||
// Override all hrefLang tags
|
||||
$event->setHrefLangs($hrefLangs);
|
||||
|
||||
// Or add a single hrefLang tag
|
||||
$event->addHrefLang('de-DE', 'https://example.com/de');
|
||||
}
|
||||
}
|
22
Classes/PageTitle/A2gPageTitleProvider.php
Executable file
22
Classes/PageTitle/A2gPageTitleProvider.php
Executable file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\PageTitle;
|
||||
|
||||
use TYPO3\CMS\Core\PageTitle\AbstractPageTitleProvider;
|
||||
/**
|
||||
* Description of A2gPageTitleProvider
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
class A2gPageTitleProvider extends AbstractPageTitleProvider
|
||||
{
|
||||
/**
|
||||
* @param string $title
|
||||
*/
|
||||
public function setTitle(string $title)
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
}
|
79
Classes/Services/FeuserSessionService.php
Executable file
79
Classes/Services/FeuserSessionService.php
Executable file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
namespace A2G\A2gProducts\Services;
|
||||
|
||||
/**
|
||||
* Description of FeuserSessionService
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
class FeuserSessionService {
|
||||
|
||||
/**
|
||||
* keyPrefix
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $keyPrefix = '';
|
||||
|
||||
/**
|
||||
*
|
||||
* @param string $keyPrefix
|
||||
*/
|
||||
public function __construct(string $keyPrefix = '') {
|
||||
$this->keyPrefix = $keyPrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the object stored in the user´s PHP session
|
||||
* @param string $key
|
||||
* @return type the stored object
|
||||
*/
|
||||
public function get(string $key) {
|
||||
$sessionData = $GLOBALS['TSFE']->fe_user->getKey('ses', $this->keyPrefix . $key);
|
||||
return unserialize($sessionData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes an object into the PHP session
|
||||
*
|
||||
* @param type $object any serializable object to store into the session
|
||||
* @param string $key identifier from the store in the session
|
||||
* @return FeuserSessionService
|
||||
*/
|
||||
public function set($object, string $key): FeuserSessionService {
|
||||
$sessionData = serialize($object);
|
||||
$GLOBALS['TSFE']->fe_user->setKey('ses', $this->keyPrefix . $key, $sessionData);
|
||||
$GLOBALS['TSFE']->fe_user->storeSessionData();
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleans up the session: removes the stored object from the PHP session
|
||||
*
|
||||
* @param type $key identifier from the store in the session to clean
|
||||
* @return FeuserSessionService
|
||||
*/
|
||||
public function clean($key): FeuserSessionService {
|
||||
$GLOBALS['TSFE']->fe_user->setKey('ses', $this->keyPrefix . $key, NULL);
|
||||
$GLOBALS['TSFE']->fe_user->storeSessionData();
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* set a prefix for your session store keys
|
||||
*
|
||||
* @param string $prefixKey
|
||||
* @return void
|
||||
*/
|
||||
public function setKeyPrefix(string $keyPrefix = ''): void {
|
||||
$this->keyPrefix = $keyPrefix;
|
||||
}
|
||||
|
||||
}
|
127
Classes/User/FilterValuesMatcher.php
Executable file
127
Classes/User/FilterValuesMatcher.php
Executable file
@ -0,0 +1,127 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\User;
|
||||
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Description of FilterValuesMatcher
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
class FilterValuesMatcher {
|
||||
|
||||
protected $conRegistration;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct() {
|
||||
$conPool = GeneralUtility::makeInstance(ConnectionPool::class);
|
||||
$this->conRegistration = $conPool->getConnectionForTable('tx_a2gproducts_domain_model_filtervalues');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param type $parameters
|
||||
* @param type $parentObject
|
||||
* @return bool
|
||||
*/
|
||||
public function showOptionsSelect(&$parameters, $parentObject): bool {
|
||||
try {
|
||||
$sql = 'SELECT count(foT.uid) as count '
|
||||
. 'FROM tx_a2gproducts_domain_model_filteroptions AS foT '
|
||||
. 'JOIN tx_a2gproducts_domain_model_filters AS fT ON fT.uid = foT.filters '
|
||||
. 'WHERE fT.uid = ? AND fT.filter_type=3 AND foT.hidden = 0 AND foT.deleted=0';
|
||||
$stmt = $this->conRegistration->prepare($sql);
|
||||
$stmt->bindValue(1, (int) $parameters['record']['rel_filters'][0]);
|
||||
$stmt->execute();
|
||||
$tmp = $stmt->fetchAll();
|
||||
if ($tmp[0] !== null) {
|
||||
return (bool) $tmp[0]['count'];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type $parameters
|
||||
* @param type $parentObject
|
||||
* @return bool
|
||||
*/
|
||||
public function showValueInput(&$parameters, $parentObject): bool {
|
||||
|
||||
try {
|
||||
$sql = 'SELECT count(foT.uid) as count '
|
||||
. 'FROM tx_a2gproducts_domain_model_filteroptions AS foT '
|
||||
. 'JOIN tx_a2gproducts_domain_model_filters AS fT ON fT.uid = foT.filters '
|
||||
. 'WHERE fT.uid = ? AND fT.filter_type IN ( 1,2 ) AND foT.hidden = 0 AND foT.deleted=0 AND foT.sys_language_uid = 0';
|
||||
$stmt = $this->conRegistration->prepare($sql);
|
||||
$stmt->bindValue(1, (int) $parameters['record']['rel_filters'][0]);
|
||||
$stmt->execute();
|
||||
$tmp = $stmt->fetchAll();
|
||||
if ($tmp[0] !== null) {
|
||||
return (bool) $tmp[0]['count'];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param type $parameters
|
||||
* @param type $parentObject
|
||||
* @return void
|
||||
*/
|
||||
public function title(&$parameters, $parentObject):void {
|
||||
try {
|
||||
if(array_key_exists('rel_filters', $parameters['row']){
|
||||
if(array_key_exists(0,$parameters['row']['rel_filters'])){
|
||||
$sql2 = 'SELECT fT.title AS title '
|
||||
. 'FROM tx_a2gproducts_domain_model_filters AS fT '
|
||||
. ' WHERE fT.uid = ? AND fT.deleted = 0 AND fT.hidden = 0';
|
||||
$stmt2 = $this->conRegistration->prepare($sql2);
|
||||
$stmt2->bindValue(1, (int) $parameters['row']['rel_filters'][0]);
|
||||
$stmt2->execute();
|
||||
$tmp2 = $stmt2->fetchAll();
|
||||
if (array_key_exists(0, $tmp2)) {
|
||||
$out = $tmp2[0]['title'];
|
||||
} else {
|
||||
$out = '';
|
||||
}
|
||||
$sql = 'SELECT fT.title AS title '
|
||||
. 'FROM tx_a2gproducts_domain_model_filteroptions AS fT '
|
||||
. ' WHERE fT.uid = ? AND fT.deleted = 0 AND fT.hidden = 0';
|
||||
$stmt = $this->conRegistration->prepare($sql);
|
||||
$stmt->bindValue(1, (int) $parameters['row']['rel_filter_option'][0]);
|
||||
$stmt->execute();
|
||||
$tmp = $stmt->fetchAll();
|
||||
if (array_key_exists(0, $tmp)) {
|
||||
$out .= ': ' . $tmp[0]['title'];
|
||||
} else {
|
||||
$out .= ': ' . $parameters['row']['value'];
|
||||
}
|
||||
$parameters['title'] .= $out;
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
21
Classes/User/Tca.php
Executable file
21
Classes/User/Tca.php
Executable file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace A2G\A2gProducts\User;
|
||||
|
||||
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
||||
|
||||
/**
|
||||
* Description of Tca
|
||||
*
|
||||
* @author Raphael Martin
|
||||
*/
|
||||
class Tca {
|
||||
|
||||
public function productVariantTitle(&$parameters) {
|
||||
$record = BackendUtility::getRecord($parameters['table'], $parameters['row']['uid']);
|
||||
$recordProduct = BackendUtility::getRecord('tx_a2gproducts_domain_model_products', $record['product']);
|
||||
$parameters['title'] = $recordProduct['title'].' - '.$record['title'];
|
||||
}
|
||||
|
||||
|
||||
}
|
41
Classes/User/TypoScript.php
Executable file
41
Classes/User/TypoScript.php
Executable file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\User;
|
||||
|
||||
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
||||
|
||||
class TypoScript
|
||||
{
|
||||
/**
|
||||
* @param string
|
||||
* @param array
|
||||
* @return string
|
||||
*/
|
||||
public function productBreadrumb(string $content, array $conf): string
|
||||
{
|
||||
$queryParams = $GLOBALS['TYPO3_REQUEST']->getQueryParams() ?? [];
|
||||
if (!isset($queryParams['tx_a2gproducts_a2gproductsdetail']['product'])) {
|
||||
return '';
|
||||
}
|
||||
$value = $queryParams['tx_a2gproducts_a2gproductsdetail']['product'];
|
||||
$record = BackendUtility::getRecord('tx_a2gproducts_domain_model_products', $value);
|
||||
return $record['title'];
|
||||
}
|
||||
/**
|
||||
* @param string
|
||||
* @param array
|
||||
* @return string
|
||||
*/
|
||||
public function ingredientBreadrumb(string $content, array $conf): string
|
||||
{
|
||||
$queryParams = $GLOBALS['TYPO3_REQUEST']->getQueryParams() ?? [];
|
||||
if (!isset($queryParams['tx_a2gproducts_ingredientsdetail']['ingredient'])) {
|
||||
return '';
|
||||
}
|
||||
$value = $queryParams['tx_a2gproducts_ingredientsdetail']['ingredient'];
|
||||
$record = BackendUtility::getRecord('tx_a2gproducts_domain_model_ingredients', $value);
|
||||
return $record['title'];
|
||||
}
|
||||
}
|
68
Classes/Utility/CanonicalUtility.php
Executable file
68
Classes/Utility/CanonicalUtility.php
Executable file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace A2G\A2gProducts\Utility;
|
||||
|
||||
use TYPO3\CMS\Extbase\Annotation as Extbase;
|
||||
|
||||
/**
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
|
||||
use TYPO3\CMS\Extbase\Object\ObjectManager;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
|
||||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||||
*/
|
||||
|
||||
/**
|
||||
* Description of Canonical
|
||||
*
|
||||
* @author Raphael Martin raphael@web-crossing.com
|
||||
*/
|
||||
class CanonicalUtility {
|
||||
|
||||
/**
|
||||
* objectManager
|
||||
*
|
||||
* @var \TYPO3\CMS\Extbase\Object\ObjectManager
|
||||
* @Extbase\Inject
|
||||
*/
|
||||
protected $objectManager = null;
|
||||
|
||||
/**
|
||||
* plugin
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
static private $plugin = 'tx_a2gproducts_a2gproductsdetail';
|
||||
|
||||
|
||||
/**
|
||||
* uidParamName
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
static private $uidParamName = 'resource';
|
||||
|
||||
/**
|
||||
* setCanonical
|
||||
*
|
||||
* @param type $href
|
||||
*/
|
||||
public function setCanonical(&$href) {
|
||||
/* not working > 11.x
|
||||
$this->objectManager = GeneralUtility::makeInstance(ObjectManager::class);
|
||||
$main = GeneralUtility::_GET(self::$plugin);
|
||||
if ($main[self::$uidParamName]) {
|
||||
$uriBuilder = $this->objectManager->get(UriBuilder::class);
|
||||
$uriBuilder->setCreateAbsoluteUri(true);
|
||||
$uriBuilder->setArguments([self::$plugin => [self::$uidParamName => $main[self::$uidParamName]]]);
|
||||
$configurationManager = GeneralUtility::makeInstance(ConfigurationManager::class);
|
||||
$settings = $configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FULL_TYPOSCRIPT);
|
||||
if (isset($settings['plugin.'][self::$plugin.'.']['settings.']['canonical']) && $settings['plugin.'][self::$plugin.'.']['settings.']['canonical'] !== 0) {
|
||||
$uriBuilder->setTargetPageUid($settings['plugin.'][self::$plugin.'.']['settings.']['canonical']);
|
||||
$href = $uriBuilder->build();
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
58
Classes/ViewHelpers/FilterActiveViewHelper.php
Executable file
58
Classes/ViewHelpers/FilterActiveViewHelper.php
Executable file
@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the package bk2k/bootstrap-package.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace A2G\A2gProducts\ViewHelpers;
|
||||
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\Traits\CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* JsonEncodeViewHelper
|
||||
*/
|
||||
class FilterActiveViewHelper extends AbstractViewHelper {
|
||||
|
||||
use CompileWithRenderStatic;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $escapeOutput = false;
|
||||
|
||||
/**
|
||||
* Initialize arguments.
|
||||
*
|
||||
* @throws \TYPO3Fluid\Fluid\Core\ViewHelper\Exception
|
||||
*/
|
||||
public function initializeArguments() {
|
||||
parent::initializeArguments();
|
||||
$this->registerArgument('filter', 'array', 'The cart array', true);
|
||||
$this->registerArgument('filterUid', 'int', 'The Filter Uid', true);
|
||||
$this->registerArgument('optionUid', 'int', 'The Filter Option Uid', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arguments
|
||||
* @param \Closure $renderChildrenClosure
|
||||
* @param RenderingContextInterface $renderingContext
|
||||
* @return mixed
|
||||
*/
|
||||
public static function renderStatic(
|
||||
array $arguments,
|
||||
\Closure $renderChildrenClosure,
|
||||
RenderingContextInterface $renderingContext
|
||||
) {
|
||||
if (isset($arguments['filter'][$arguments['filterUid']][$arguments['optionUid']])) {
|
||||
return 'checked';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
2
Configuration/.htaccess
Executable file
2
Configuration/.htaccess
Executable file
@ -0,0 +1,2 @@
|
||||
Order deny,allow
|
||||
Deny from all
|
20
Configuration/Extbase/Persistence/Classes.php
Executable file
20
Configuration/Extbase/Persistence/Classes.php
Executable file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
A2G\A2gProducts\Domain\Model\MasonryItem::class => [
|
||||
'tableName' => 'tx_a2gtoolkit_masonry_item',
|
||||
'properties' => [
|
||||
'title' => [
|
||||
'fieldName' => 'title',
|
||||
],
|
||||
'itemClass' => [
|
||||
'fieldName' => 'item_class',
|
||||
],
|
||||
'image' => [
|
||||
'fieldName' => 'image',
|
||||
],
|
||||
],
|
||||
]
|
||||
];
|
104
Configuration/FlexForms/flexform_detail.xml
Executable file
104
Configuration/FlexForms/flexform_detail.xml
Executable file
@ -0,0 +1,104 @@
|
||||
<T3DataStructure>
|
||||
<sheets>
|
||||
<sDEF>
|
||||
<ROOT>
|
||||
<TCEforms>
|
||||
<sheetTitle>Function</sheetTitle>
|
||||
</TCEforms>
|
||||
<type>array</type>
|
||||
<el>
|
||||
<settings.listPage>
|
||||
<label>product list page</label>
|
||||
<config>
|
||||
<type>group</type>
|
||||
<internal_type>db</internal_type>
|
||||
<allowed>pages</allowed>
|
||||
<size>1</size>
|
||||
<maxitems>1</maxitems>
|
||||
<minitems>1</minitems>
|
||||
<show_thumbs>1</show_thumbs>
|
||||
</config>
|
||||
</settings.listPage>
|
||||
<settings.pageTitleSuffix>
|
||||
<label>detail page title suffix</label>
|
||||
<config>
|
||||
<type>input</type>
|
||||
<size>50</size>
|
||||
<eval>trim</eval>
|
||||
<enableRichtext>0</enableRichtext>
|
||||
</config>
|
||||
</settings.pageTitleSuffix>
|
||||
<settings.allowedCategories>
|
||||
<label>Show Categories</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectMultipleSideBySide</renderType>
|
||||
<items type="array">
|
||||
</items>
|
||||
<foreign_table>tx_a2gproducts_domain_model_categories</foreign_table>
|
||||
<foreign_table_where>
|
||||
AND (tx_a2gproducts_domain_model_categories.sys_language_uid=CAST('###REC_FIELD_sys_language_uid###' AS UNSIGNED) OR tx_a2gproducts_domain_model_categories.sys_language_uid= '-1')
|
||||
</foreign_table_where>
|
||||
<maxitems>99</maxitems>
|
||||
<minitems>0</minitems>
|
||||
<size>10</size>
|
||||
</config>
|
||||
</settings.allowedCategories>
|
||||
<settings.ingredientsDetailPage>
|
||||
<label>ingredients detail page</label>
|
||||
<config>
|
||||
<type>group</type>
|
||||
<internal_type>db</internal_type>
|
||||
<allowed>pages</allowed>
|
||||
<size>1</size>
|
||||
<maxitems>1</maxitems>
|
||||
<minitems>0</minitems>
|
||||
<show_thumbs>1</show_thumbs>
|
||||
</config>
|
||||
</settings.ingredientsDetailPage>
|
||||
<settings.style>
|
||||
<label>Detail Page Style</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">Default</numIndex>
|
||||
<numIndex index="1">Default</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">StyleOne</numIndex>
|
||||
<numIndex index="1">StyleOne</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
</config>
|
||||
</settings.style>
|
||||
<settings.showCategories>
|
||||
<label>Allowed Categories</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectMultipleSideBySide</renderType>
|
||||
<items type="array">
|
||||
</items>
|
||||
<foreign_table>tx_a2gproducts_domain_model_categories</foreign_table>
|
||||
<foreign_table_where>
|
||||
AND (tx_a2gproducts_domain_model_categories.sys_language_uid=CAST('###REC_FIELD_sys_language_uid###' AS UNSIGNED) OR tx_a2gproducts_domain_model_categories.sys_language_uid= '-1')
|
||||
</foreign_table_where>
|
||||
<maxitems>99</maxitems>
|
||||
<minitems>0</minitems>
|
||||
<size>10</size>
|
||||
</config>
|
||||
</settings.showCategories>
|
||||
<settings.requestMailTo>
|
||||
<label>LLL:EXT:a2g_shop/Resources/Private/Language/backend.xlf:flexform.request_mail_to</label>
|
||||
<config>
|
||||
<type>input</type>
|
||||
<size>80</size>
|
||||
<eval>trim</eval>
|
||||
</config>
|
||||
</settings.requestMailTo>
|
||||
</el>
|
||||
</ROOT>
|
||||
</sDEF>
|
||||
</sheets>
|
||||
</T3DataStructure>
|
64
Configuration/FlexForms/flexform_ingredients_detail.xml
Executable file
64
Configuration/FlexForms/flexform_ingredients_detail.xml
Executable file
@ -0,0 +1,64 @@
|
||||
<T3DataStructure>
|
||||
<sheets>
|
||||
<sDEF>
|
||||
<ROOT>
|
||||
<TCEforms>
|
||||
<sheetTitle>Function</sheetTitle>
|
||||
</TCEforms>
|
||||
<type>array</type>
|
||||
<el>
|
||||
<settings.listPage>
|
||||
<label>list page</label>
|
||||
<config>
|
||||
<type>group</type>
|
||||
<internal_type>db</internal_type>
|
||||
<allowed>pages</allowed>
|
||||
<size>1</size>
|
||||
<maxitems>1</maxitems>
|
||||
<minitems>0</minitems>
|
||||
<show_thumbs>1</show_thumbs>
|
||||
</config>
|
||||
</settings.listPage>
|
||||
<settings.pageTitleSuffix>
|
||||
<label>detail page title suffix</label>
|
||||
<config>
|
||||
<type>input</type>
|
||||
<size>50</size>
|
||||
<eval>trim</eval>
|
||||
<enableRichtext>0</enableRichtext>
|
||||
</config>
|
||||
</settings.pageTitleSuffix>
|
||||
<settings.productDetailPage>
|
||||
<label>Product Detail Page</label>
|
||||
<config>
|
||||
<type>group</type>
|
||||
<internal_type>db</internal_type>
|
||||
<allowed>pages</allowed>
|
||||
<size>1</size>
|
||||
<maxitems>1</maxitems>
|
||||
<minitems>0</minitems>
|
||||
<show_thumbs>1</show_thumbs>
|
||||
</config>
|
||||
</settings.productDetailPage>
|
||||
<settings.detailPagePluginType>
|
||||
<label>Product Detail Extension</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">A2gProducts</numIndex>
|
||||
<numIndex index="1">A2gProducts</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">A2gShop</numIndex>
|
||||
<numIndex index="1">A2gShop</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
</config>
|
||||
</settings.detailPagePluginType>
|
||||
</el>
|
||||
</ROOT>
|
||||
</sDEF>
|
||||
</sheets>
|
||||
</T3DataStructure>
|
34
Configuration/FlexForms/flexform_ingredients_list.xml
Executable file
34
Configuration/FlexForms/flexform_ingredients_list.xml
Executable file
@ -0,0 +1,34 @@
|
||||
<T3DataStructure>
|
||||
<sheets>
|
||||
<sDEF>
|
||||
<ROOT>
|
||||
<TCEforms>
|
||||
<sheetTitle>Function</sheetTitle>
|
||||
</TCEforms>
|
||||
<type>array</type>
|
||||
<el>
|
||||
<settings.ingredientsDetailPage>
|
||||
<label>detail page</label>
|
||||
<config>
|
||||
<type>group</type>
|
||||
<internal_type>db</internal_type>
|
||||
<allowed>pages</allowed>
|
||||
<size>1</size>
|
||||
<maxitems>1</maxitems>
|
||||
<show_thumbs>1</show_thumbs>
|
||||
</config>
|
||||
</settings.ingredientsDetailPage>
|
||||
<settings.ajaxListLimit>
|
||||
<label>ajax List Limit</label>
|
||||
<config>
|
||||
<type>input</type>
|
||||
<size>20</size>
|
||||
<max>30</max>
|
||||
<eval>int,trim</eval>
|
||||
</config>
|
||||
</settings.ajaxListLimit>
|
||||
</el>
|
||||
</ROOT>
|
||||
</sDEF>
|
||||
</sheets>
|
||||
</T3DataStructure>
|
104
Configuration/FlexForms/flexform_list.xml
Executable file
104
Configuration/FlexForms/flexform_list.xml
Executable file
@ -0,0 +1,104 @@
|
||||
<T3DataStructure>
|
||||
<sheets>
|
||||
<sDEF>
|
||||
<ROOT>
|
||||
<TCEforms>
|
||||
<sheetTitle>Function</sheetTitle>
|
||||
</TCEforms>
|
||||
<type>array</type>
|
||||
<el>
|
||||
<settings.productDetailPage>
|
||||
<label>detail page</label>
|
||||
<config>
|
||||
<type>group</type>
|
||||
<internal_type>db</internal_type>
|
||||
<allowed>pages</allowed>
|
||||
<size>1</size>
|
||||
<maxitems>1</maxitems>
|
||||
<minitems>0</minitems>
|
||||
<show_thumbs>1</show_thumbs>
|
||||
</config>
|
||||
</settings.productDetailPage>
|
||||
<settings.detailPagePluginType>
|
||||
<label>List Content</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">A2gProducts</numIndex>
|
||||
<numIndex index="1">A2gProducts</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">A2gShop</numIndex>
|
||||
<numIndex index="1">A2gShop</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
</config>
|
||||
</settings.detailPagePluginType>
|
||||
<settings.showCategories>
|
||||
<label>Show Categories</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectMultipleSideBySide</renderType>
|
||||
<items type="array">
|
||||
</items>
|
||||
<foreign_table>tx_a2gproducts_domain_model_categories</foreign_table>
|
||||
<foreign_table_where>
|
||||
AND (tx_a2gproducts_domain_model_categories.sys_language_uid=CAST('###REC_FIELD_sys_language_uid###' AS UNSIGNED) OR tx_a2gproducts_domain_model_categories.sys_language_uid= '-1')
|
||||
</foreign_table_where>
|
||||
<maxitems>99</maxitems>
|
||||
<minitems>0</minitems>
|
||||
<size>10</size>
|
||||
</config>
|
||||
</settings.showCategories>
|
||||
<settings.ajaxListLimit>
|
||||
<label>Ajax List Limit</label>
|
||||
<config>
|
||||
<type>input</type>
|
||||
<size>20</size>
|
||||
<max>30</max>
|
||||
<eval>int,trim</eval>
|
||||
</config>
|
||||
</settings.ajaxListLimit>
|
||||
<settings.listContent>
|
||||
<label>List Content</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">Product</numIndex>
|
||||
<numIndex index="1">Product</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
</config>
|
||||
</settings.listContent>
|
||||
<settings.style>
|
||||
<label>Detail Page Style</label>
|
||||
<config>
|
||||
<type>select</type>
|
||||
<renderType>selectSingle</renderType>
|
||||
<items type="array">
|
||||
<numIndex index="0" type="array">
|
||||
<numIndex index="0">Default</numIndex>
|
||||
<numIndex index="1">Default</numIndex>
|
||||
</numIndex>
|
||||
<numIndex index="1" type="array">
|
||||
<numIndex index="0">StyleOne</numIndex>
|
||||
<numIndex index="1">StyleOne</numIndex>
|
||||
</numIndex>
|
||||
</items>
|
||||
</config>
|
||||
</settings.style>
|
||||
<settings.noSearch>
|
||||
<label>hide search</label>
|
||||
<config>
|
||||
<type>check</type>
|
||||
</config>
|
||||
</settings.noSearch>
|
||||
</el>
|
||||
</ROOT>
|
||||
</sDEF>
|
||||
</sheets>
|
||||
</T3DataStructure>
|
21
Configuration/Services.yml
Executable file
21
Configuration/Services.yml
Executable file
@ -0,0 +1,21 @@
|
||||
services:
|
||||
_defaults:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
public: false
|
||||
|
||||
a2gproducts.cache:
|
||||
class: TYPO3\CMS\Core\Cache\Frontend\PhpFrontend
|
||||
# We can not use CacheManager, as it can not be
|
||||
# injected/instantiated during ext_localconf.php loading
|
||||
# factory: ['@TYPO3\CMS\Core\Cache\CacheManager', 'getCache']
|
||||
# therefore we use the static Bootstrap::createCache factory instead.
|
||||
factory: ['TYPO3\CMS\Core\Core\Bootstrap', 'createCache']
|
||||
arguments: ['products']
|
||||
|
||||
A2G\A2gProducts\Hreflang\EventListener\ProductsHrefLang:
|
||||
tags:
|
||||
- name: event.listener
|
||||
identifier: 'a2g-products/ProductsHrefLang'
|
||||
after: 'typo3-seo/hreflangGenerator'
|
||||
event: TYPO3\CMS\Frontend\Event\ModifyHrefLangTagsEvent
|
30
Configuration/TCA/Overrides/100_sys_template.php
Executable file
30
Configuration/TCA/Overrides/100_sys_template.php
Executable file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') || die();
|
||||
|
||||
/***************
|
||||
* TypoScript: Full Package
|
||||
* This includes the full setup including all configurations
|
||||
*/
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
|
||||
'a2g_products',
|
||||
'Configuration/TypoScript',
|
||||
'Altogether Products: Full Package'
|
||||
);
|
||||
|
||||
/***************
|
||||
* TypoScript: Base Package
|
||||
*/
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
|
||||
'a2g_products',
|
||||
'Configuration/TypoScript/Base',
|
||||
'Altogether Products: Base Package'
|
||||
);
|
||||
|
||||
/***************
|
||||
* TypoScript: Google Analytics Integration
|
||||
*/
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
|
||||
'a2g_products',
|
||||
'Configuration/TypoScript/GoogleAnalytics',
|
||||
'Altogether Products: Google Analytics Integration'
|
||||
);
|
60
Configuration/TCA/Overrides/102_tt_content.php
Executable file
60
Configuration/TCA/Overrides/102_tt_content.php
Executable file
@ -0,0 +1,60 @@
|
||||
<?php
|
||||
defined('TYPO3_MODE') || die();
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'A2gProducts',
|
||||
'A2gproductslist',
|
||||
'Product List'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'A2gProducts',
|
||||
'A2gproductsdetail',
|
||||
'Product Detail'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'A2gProducts',
|
||||
'Ingredientslist',
|
||||
'Ingredients List'
|
||||
);
|
||||
|
||||
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'A2gProducts',
|
||||
'Ingredientsdetail',
|
||||
'Ingredients Detail'
|
||||
);
|
||||
|
||||
$pluginSignatures = [
|
||||
'a2gproducts_a2gproductslist' => 'flexform_list',
|
||||
'a2gproducts_a2gproductsdetail' => 'flexform_detail',
|
||||
'a2gproducts_ingredientslist' => 'flexform_ingredients_list',
|
||||
'a2gproducts_ingredientsdetail' => 'flexform_ingredients_detail'
|
||||
];
|
||||
|
||||
foreach ($pluginSignatures as $pluginSignature => $flexform) {
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature]='pages,layout,select_key,recursive';
|
||||
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature]='pi_flexform';
|
||||
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
|
||||
$pluginSignature,
|
||||
'FILE:EXT:a2g_products/Configuration/FlexForms/'.$flexform.'.xml'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* typo3 12
|
||||
*
|
||||
$pluginSignature = \TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
|
||||
'A2gMaps',
|
||||
'map',
|
||||
'Map'
|
||||
);
|
||||
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature]
|
||||
= 'pi_flexform';
|
||||
ExtensionManagementUtility::addPiFlexFormValue(
|
||||
$pluginSignature,
|
||||
'FILE:EXT:a2g_maps/Configuration/FlexForms/flexform_map.xml'
|
||||
);
|
||||
*/
|
61
Configuration/TCA/Overrides/500_cropping.php
Executable file
61
Configuration/TCA/Overrides/500_cropping.php
Executable file
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
|
||||
defined('TYPO3') or die('Access denied.');
|
||||
|
||||
// Add crop variants
|
||||
$defaultCropSettings = [
|
||||
'title' => 'LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:option.default',
|
||||
'allowedAspectRatios' => [
|
||||
'16:10' => [
|
||||
'title' => '16:10',
|
||||
'value' => 16 / 10
|
||||
],
|
||||
'16:9' => [
|
||||
'title' => 'LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:ratio.16_9',
|
||||
'value' => 16 / 9
|
||||
],
|
||||
'4:3' => [
|
||||
'title' => 'LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:ratio.4_3',
|
||||
'value' => 4 / 3
|
||||
],
|
||||
'1:1' => [
|
||||
'title' => 'LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:ratio.1_1',
|
||||
'value' => 1.0
|
||||
],
|
||||
'NaN' => [
|
||||
'title' => 'LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:ratio.free',
|
||||
'value' => 0.0
|
||||
],
|
||||
],
|
||||
'selectedRatio' => 'NaN',
|
||||
'cropArea' => [
|
||||
'x' => 0.0,
|
||||
'y' => 0.0,
|
||||
'width' => 1.0,
|
||||
'height' => 1.0,
|
||||
]
|
||||
];
|
||||
$largeCropSettings = $defaultCropSettings;
|
||||
$largeCropSettings['title'] = 'LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:option.large';
|
||||
$mediumCropSettings = $defaultCropSettings;
|
||||
$mediumCropSettings['title'] = 'LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:option.medium';
|
||||
$smallCropSettings = $defaultCropSettings;
|
||||
$smallCropSettings['title'] = 'LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:option.small';
|
||||
$extrasmallCropSettings = $defaultCropSettings;
|
||||
$extrasmallCropSettings['title'] = 'LLL:EXT:bootstrap_package/Resources/Private/Language/Backend.xlf:option.extrasmall';
|
||||
|
||||
// Content Element Background Image
|
||||
$GLOBALS['TCA']['tx_a2gproducts_domain_model_ingredients']['columns']['image']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants']['default'] = $defaultCropSettings;
|
||||
$GLOBALS['TCA']['tx_a2gproducts_domain_model_ingredients']['columns']['images']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants']['default'] = $defaultCropSettings;
|
||||
|
||||
$GLOBALS['TCA']['tx_a2gproducts_domain_model_products']['columns']['image']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants']['default'] = $defaultCropSettings;
|
||||
$GLOBALS['TCA']['tx_a2gproducts_domain_model_products']['columns']['images']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants']['default'] = $defaultCropSettings;
|
||||
|
||||
$GLOBALS['TCA']['tx_a2gproducts_domain_model_productvariants']['columns']['image']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants']['default'] = $defaultCropSettings;
|
||||
$GLOBALS['TCA']['tx_a2gproducts_domain_model_productvariants']['columns']['images']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants']['default'] = $defaultCropSettings;
|
||||
|
||||
//$GLOBALS['TCA']['tx_a2gproducts_domain_model_ingredients']['columns']['image']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants']['large'] = $largeCropSettings;
|
||||
//$GLOBALS['TCA']['tx_a2gproducts_domain_model_ingredients']['columns']['image']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants']['medium'] = $mediumCropSettings;
|
||||
//$GLOBALS['TCA']['tx_a2gproducts_domain_model_ingredients']['columns']['image']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants']['small'] = $smallCropSettings;
|
||||
//$GLOBALS['TCA']['tx_a2gproducts_domain_model_ingredients']['columns']['image']['config']['overrideChildTca']['columns']['crop']['config']['cropVariants']['extrasmall'] = $extrasmallCropSettings;
|
164
Configuration/TCA/tx_a2gproducts_domain_model_brands.php
Executable file
164
Configuration/TCA/tx_a2gproducts_domain_model_brands.php
Executable file
@ -0,0 +1,164 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2gproducts_domain_model_brands',
|
||||
'label' => 'title',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'sortby' => 'sorting',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'versioningWS' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'thumbnail' => 'image',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden',
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'nr,title',
|
||||
'iconfile' => 'EXT:a2g_products/Resources/Public/Icons/brand-image.png'
|
||||
],
|
||||
'types' => [
|
||||
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, path_segment, image, '
|
||||
. '--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
||||
],
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'language'
|
||||
],
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 0,
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_brands',
|
||||
'foreign_table_where' => 'AND {#tx_a2gproducts_domain_model_brands}.{#pid}=###CURRENT_PID### AND {#tx_a2gproducts_domain_model_brands}.{#sys_language_uid} IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
'starttime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
'endtime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'range' => [
|
||||
'upper' => mktime(0, 0, 0, 1, 1, 2038)
|
||||
],
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
'title' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:title',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim, required',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'image' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:image',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
],
|
||||
];
|
199
Configuration/TCA/tx_a2gproducts_domain_model_categories.php
Executable file
199
Configuration/TCA/tx_a2gproducts_domain_model_categories.php
Executable file
@ -0,0 +1,199 @@
|
||||
<?php
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2gproducts_domain_model_categories',
|
||||
'label' => 'title',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'sortby' => 'sorting',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'versioningWS' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden',
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'title,description',
|
||||
'iconfile' => 'EXT:a2g_products/Resources/Public/Icons/categories.png'
|
||||
],
|
||||
'types' => [
|
||||
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, rel_filters, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
||||
],
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'language'
|
||||
],
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 0,
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_categories',
|
||||
'foreign_table_where' => 'AND {#tx_a2gproducts_domain_model_categories}.{#pid}=###CURRENT_PID### AND {#tx_a2gproducts_domain_model_categories}.{#sys_language_uid} IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
'starttime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
'endtime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'range' => [
|
||||
'upper' => mktime(0, 0, 0, 1, 1, 2038)
|
||||
],
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
|
||||
'title' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:title',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim, required',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'description' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:description',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'image' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:image',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'foreign_types' => [
|
||||
'0' => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
]
|
||||
],
|
||||
'foreign_match_fields' => [
|
||||
'fieldname' => 'image',
|
||||
'tablenames' => 'tx_a2gproducts_domain_model_categories',
|
||||
'table_local' => 'sys_file',
|
||||
],
|
||||
'maxitems' => 1
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
|
||||
],
|
||||
'rel_filters' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_filters',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectMultipleSideBySide',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_filters',
|
||||
'foreign_table_where' => ' AND tx_a2gproducts_domain_model_filters.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1) ',
|
||||
'MM' => 'tx_a2gproducts_categories_filters_mm',
|
||||
'size' => 10,
|
||||
'autoSizeMax' => 30,
|
||||
'maxitems' => 9999,
|
||||
'multiple' => 0,
|
||||
'fieldControl' => [
|
||||
'editPopup' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'addRecord' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'listModule' => [
|
||||
'disabled' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
],
|
||||
];
|
102
Configuration/TCA/tx_a2gproducts_domain_model_filteroptions.php
Executable file
102
Configuration/TCA/tx_a2gproducts_domain_model_filteroptions.php
Executable file
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2gproducts_domain_model_filteroptions',
|
||||
'label' => 'title',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'sortby' => 'sorting',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'versioningWS' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'hideTable' => false,
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden'
|
||||
],
|
||||
'searchFields' => 'title',
|
||||
'hideTable' => true,
|
||||
'iconfile' => 'EXT:a2g_products/Resources/Public/Icons/filter-option.png'
|
||||
],
|
||||
'types' => [
|
||||
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, value_min, value_max'],
|
||||
],
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'language'
|
||||
],
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 0,
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_filteroptions',
|
||||
'foreign_table_where' => 'AND {#tx_a2gproducts_domain_model_filteroptions}.{#pid}=###CURRENT_PID### AND {#tx_a2gproducts_domain_model_filteroptions}.{#sys_language_uid} IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
'title' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:title',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'value_min' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:value_min',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'double2'
|
||||
],
|
||||
],
|
||||
'value_max' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:value_max',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'double2'
|
||||
],
|
||||
],
|
||||
'filters' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
180
Configuration/TCA/tx_a2gproducts_domain_model_filters.php
Executable file
180
Configuration/TCA/tx_a2gproducts_domain_model_filters.php
Executable file
@ -0,0 +1,180 @@
|
||||
<?php
|
||||
use A2G\A2gProducts\Domain\Model\Filters;
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2gproducts_domain_model_filters',
|
||||
'label' => 'title',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'sortby' => 'sorting',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'versioningWS' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'type' => 'rel_filter_option',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden',
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'title,filter_type',
|
||||
'iconfile' => 'EXT:a2g_products/Resources/Public/Icons/filters.png'
|
||||
],
|
||||
'types' => [
|
||||
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, filter_type, db_operation_max, db_operation_min, rel_filter_option, --div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
||||
],
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'language'
|
||||
],
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 0,
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_filters',
|
||||
'foreign_table_where' => 'AND {#tx_a2gproducts_domain_model_filters}.{#pid}=###CURRENT_PID### AND {#tx_a2gproducts_domain_model_filters}.{#sys_language_uid} IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
'starttime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
'endtime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'range' => [
|
||||
'upper' => mktime(0, 0, 0, 1, 1, 2038)
|
||||
],
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
|
||||
'title' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:title',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'filter_type' => [
|
||||
'exclude' => true,
|
||||
'onChange' => 'reload',
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:filter_type',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 3,
|
||||
'items' => [
|
||||
// [Filters::$dbType[1], 1],
|
||||
// [Filters::$dbType[2], 2],
|
||||
['LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:filter_type.'.Filters::$dbType[3], 3]
|
||||
],
|
||||
],
|
||||
],
|
||||
'db_operation_max' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:db_operation_max',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
[Filters::$dbOperations[1], 1],
|
||||
[Filters::$dbOperations[2], 2],
|
||||
[Filters::$dbOperations[3], 3],
|
||||
[Filters::$dbOperations[4], 4],
|
||||
[Filters::$dbOperations[5], 5]
|
||||
],
|
||||
],
|
||||
'displayCond' => 'FIELD:filter_type:=:1',
|
||||
],
|
||||
'db_operation_min' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:db_operation_min',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'items' => [
|
||||
[Filters::$dbOperations[1], 1],
|
||||
[Filters::$dbOperations[2], 2],
|
||||
[Filters::$dbOperations[3], 3],
|
||||
[Filters::$dbOperations[4], 4],
|
||||
[Filters::$dbOperations[5], 5]
|
||||
],
|
||||
],
|
||||
'displayCond' => 'FIELD:filter_type:IN:1,2',
|
||||
],
|
||||
'rel_filter_option' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_filter_option',
|
||||
'config' => [
|
||||
'type' => 'inline',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_filteroptions',
|
||||
'foreign_table_where' => 'AND tx_a2gproducts_domain_model_filters.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1)',
|
||||
'foreign_field' => 'filters',
|
||||
'maxitems' => 9999,
|
||||
'appearance' => [
|
||||
'collapseAll' => 1,
|
||||
'expandSingle' => 1,
|
||||
'levelLinksPosition' => 'top',
|
||||
'showSynchronizationLink' => 1,
|
||||
'showPossibleLocalizationRecords' => 1,
|
||||
'showAllLocalizationLink' => 1
|
||||
],
|
||||
],
|
||||
|
||||
],
|
||||
|
||||
],
|
||||
];
|
117
Configuration/TCA/tx_a2gproducts_domain_model_filtervalues.php
Executable file
117
Configuration/TCA/tx_a2gproducts_domain_model_filtervalues.php
Executable file
@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2gproducts_domain_model_filtervalues',
|
||||
'label' => 'value',
|
||||
'label_userFunc' => 'A2G\\A2gProducts\\User\\FilterValuesMatcher->title',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'type' => 'rel_filter_option',
|
||||
'versioningWS' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'hideTable' => true,
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden'
|
||||
],
|
||||
'searchFields' => '',
|
||||
'iconfile' => 'EXT:a2g_products/Resources/Public/Icons/filter-option.png'
|
||||
],
|
||||
'types' => [
|
||||
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, value,rel_filter_option, rel_filters'],
|
||||
],
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'language'
|
||||
],
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 0,
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_filtervalues',
|
||||
'foreign_table_where' => 'AND {#tx_a2gproducts_domain_model_filtervalues}.{#pid}=###CURRENT_PID### AND {#tx_a2gproducts_domain_model_filtervalues}.{#sys_language_uid} IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
'value' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:value',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'double2'
|
||||
],
|
||||
'displayCond' => 'USER:A2G\\A2gProducts\\User\\FilterValuesMatcher->showValueInput',
|
||||
],
|
||||
'rel_filter_option' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_filter_option',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_filteroptions',
|
||||
'foreign_table_where' => 'AND tx_a2gproducts_domain_model_filteroptions.filters = ###REC_FIELD_rel_filters### AND tx_a2gproducts_domain_model_filteroptions.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1)',
|
||||
'default' => 0,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
'displayCond' => 'USER:A2G\\A2gProducts\\User\\FilterValuesMatcher->showOptionsSelect',
|
||||
],
|
||||
'rel_filters' => [
|
||||
'exclude' => true,
|
||||
'onChange' => 'reload',
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_filters',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_filters',
|
||||
'foreign_table_where' => 'AND tx_a2gproducts_domain_model_filters.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1)',
|
||||
'default' => 0,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
'products' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'productvariants' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
308
Configuration/TCA/tx_a2gproducts_domain_model_ingredients.php
Executable file
308
Configuration/TCA/tx_a2gproducts_domain_model_ingredients.php
Executable file
@ -0,0 +1,308 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2gproducts_domain_model_ingredients',
|
||||
'label' => 'title',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'sortby' => 'sorting',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'versioningWS' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden',
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'nr,title,description',
|
||||
'iconfile' => 'EXT:a2g_products/Resources/Public/Icons/natural-ingredients.png'
|
||||
],
|
||||
'types' => [
|
||||
'1' => ['showitem' => 'sys_language_uid, l10n_diffsource, hidden, title, path_segment, description,'
|
||||
. '--div--;LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:images_tab, image, images, gallery,'
|
||||
. '--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
||||
],
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'language'
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
'starttime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
'endtime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'range' => [
|
||||
'upper' => mktime(0, 0, 0, 1, 1, 2038)
|
||||
],
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
'title' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:title',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'path_segment' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:slug',
|
||||
'config' => [
|
||||
'type' => 'slug',
|
||||
'size' => 50,
|
||||
'generatorOptions' => [
|
||||
'fields' => ['title'],
|
||||
'fieldSeparator' => '/',
|
||||
'prefixParentPageSlug' => true,
|
||||
'replacements' => [
|
||||
'/' => '',
|
||||
],
|
||||
],
|
||||
'fallbackCharacter' => '-',
|
||||
'eval' => 'uniqueInSite',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'description' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:description',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => 40,
|
||||
'rows' => 15,
|
||||
'eval' => 'trim',
|
||||
'default' => ''
|
||||
]
|
||||
],
|
||||
'image' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:image',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'images' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:images',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'images',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 10,
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'gallery' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_toolkit/Resources/Private/Language/Backend.xlf:masonry_item',
|
||||
'config' => [
|
||||
'type' => 'inline',
|
||||
'foreign_table' => 'tx_a2gtoolkit_masonry_item',
|
||||
'foreign_field' => 'a2g_ingredients',
|
||||
'appearance' => [
|
||||
'useSortable' => true,
|
||||
'showSynchronizationLink' => true,
|
||||
'showAllLocalizationLink' => true,
|
||||
'showPossibleLocalizationRecords' => true,
|
||||
'expandSingle' => true,
|
||||
'enabledControls' => [
|
||||
'localize' => true,
|
||||
]
|
||||
],
|
||||
'behaviour' => [
|
||||
'mode' => 'select',
|
||||
]
|
||||
],
|
||||
],
|
||||
'rel_products' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_products',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectMultipleSideBySide',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_products',
|
||||
'foreign_table_where' => ' AND tx_a2gproducts_domain_model_products.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1) AND tx_a2gproducts_domain_model_products.pid=###CURRENT_PID### ',
|
||||
'MM' => 'tx_a2gproducts_products_ingredients_mm',
|
||||
'MM_opposite_field' => 'uid_foreign',
|
||||
'size' => 10,
|
||||
'autoSizeMax' => 30,
|
||||
'maxitems' => 20,
|
||||
'multiple' => 0,
|
||||
'fieldControl' => [
|
||||
'editPopup' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'addRecord' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'listModule' => [
|
||||
'disabled' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'rel_productvariants' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_productvariants',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectMultipleSideBySide',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_productvariants',
|
||||
'foreign_table_where' => ' AND tx_a2gproducts_domain_model_productvariants.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1) AND tx_a2gproducts_domain_model_productvariants.pid=###CURRENT_PID### ',
|
||||
'MM' => 'tx_a2gproducts_products_productvariants_mm',
|
||||
'MM_opposite_field' => 'uid_foreign',
|
||||
'size' => 10,
|
||||
'autoSizeMax' => 30,
|
||||
'maxitems' => 20,
|
||||
'multiple' => 0,
|
||||
'fieldControl' => [
|
||||
'editPopup' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'addRecord' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'listModule' => [
|
||||
'disabled' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
599
Configuration/TCA/tx_a2gproducts_domain_model_products.php
Executable file
599
Configuration/TCA/tx_a2gproducts_domain_model_products.php
Executable file
@ -0,0 +1,599 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2gproducts_domain_model_products',
|
||||
'label' => 'title',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'sortby' => 'sorting',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'versioningWS' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'descriptionColumn' => 'description',
|
||||
'thumbnail' => 'image',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden',
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'nr,title,description',
|
||||
'iconfile' => 'EXT:a2g_products/Resources/Public/Icons/package.png'
|
||||
],
|
||||
'types' => [
|
||||
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, nr, title, path_segment, rel_category, description, description_html, rel_brand,'
|
||||
. '--div--;LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:images_tab, image, images,'
|
||||
. '--div--;LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:ingredients_tab, rel_ingredients,'
|
||||
. '--div--;LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:filters_tab, rel_filter_values, '
|
||||
// . '--div--;Product Attributes, rel_selectableattribute, '
|
||||
. '--div--;LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:product_variants_tab, rel_productvariants, '
|
||||
. '--div--;LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:seo_tab, seo_image1x1,seo_image4x3,seo_image16x9,'
|
||||
. '--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
||||
],
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'language'
|
||||
],
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 0,
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_products',
|
||||
'foreign_table_where' => 'AND {#tx_a2gproducts_domain_model_products}.{#pid}=###CURRENT_PID### AND {#tx_a2gproducts_domain_model_products}.{#sys_language_uid} IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
'starttime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
'endtime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'range' => [
|
||||
'upper' => mktime(0, 0, 0, 1, 1, 2038)
|
||||
],
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
'nr' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:product_nr',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim, required',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'title' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:title',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim, required',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'path_segment' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:slug',
|
||||
'config' => [
|
||||
'type' => 'slug',
|
||||
'size' => 50,
|
||||
'generatorOptions' => [
|
||||
'fields' => ['title'],
|
||||
'fieldSeparator' => '/',
|
||||
'prefixParentPageSlug' => true,
|
||||
'replacements' => [
|
||||
'/' => '',
|
||||
],
|
||||
],
|
||||
'fallbackCharacter' => '-',
|
||||
'eval' => 'uniqueInSite',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'description' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:description',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => 40,
|
||||
'rows' => 15,
|
||||
'eval' => 'trim',
|
||||
'default' => ''
|
||||
]
|
||||
],
|
||||
'description_html' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:description_html',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => 40,
|
||||
'rows' => 15,
|
||||
'eval' => 'trim',
|
||||
'enableRichtext' => true,
|
||||
'default' => ''
|
||||
]
|
||||
],
|
||||
'image' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:image',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'images' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:images',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'images',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 10,
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'gallery' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_toolkit/Resources/Private/Language/Backend.xlf:masonry_item',
|
||||
'config' => [
|
||||
'type' => 'inline',
|
||||
'foreign_table' => 'tx_a2gtoolkit_masonry_item',
|
||||
'foreign_field' => 'a2g_products',
|
||||
'appearance' => [
|
||||
'useSortable' => true,
|
||||
'showSynchronizationLink' => true,
|
||||
'showAllLocalizationLink' => true,
|
||||
'showPossibleLocalizationRecords' => true,
|
||||
'expandSingle' => true,
|
||||
'enabledControls' => [
|
||||
'localize' => true,
|
||||
]
|
||||
],
|
||||
'behaviour' => [
|
||||
'mode' => 'select',
|
||||
]
|
||||
],
|
||||
],
|
||||
'seo_image1x1' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:seo_image1x1',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'foreign_match_fields' => [
|
||||
'fieldname' => 'seo_image1x1',
|
||||
'tablenames' => 'tx_a2gproducts_domain_model_products',
|
||||
'table_local' => 'sys_file',
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'seo_image4x3' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:seo_image4x3',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'foreign_match_fields' => [
|
||||
'fieldname' => 'seo_image4x3',
|
||||
'tablenames' => 'tx_a2gproducts_domain_model_products',
|
||||
'table_local' => 'sys_file',
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'seo_image16x9' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:seo_image16x9',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'foreign_match_fields' => [
|
||||
'fieldname' => 'seo_image16x9',
|
||||
'tablenames' => 'tx_a2gproducts_domain_model_products',
|
||||
'table_local' => 'sys_file',
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'rel_category' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_category',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectMultipleSideBySide',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_categories',
|
||||
'foreign_table_where' => ' AND {#tx_a2gproducts_domain_model_categories}.{#sys_language_uid} IN (###REC_FIELD_sys_language_uid###,-1) AND {#tx_a2gproducts_domain_model_categories}.{#pid}=###CURRENT_PID### ',
|
||||
'MM' => 'tx_a2gproducts_products_categories_mm',
|
||||
'size' => 10,
|
||||
'autoSizeMax' => 30,
|
||||
'maxitems' => 20,
|
||||
'multiple' => false,
|
||||
'fieldControl' => [
|
||||
'editPopup' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'addRecord' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'listModule' => [
|
||||
'disabled' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'rel_filter_values' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_filter_values',
|
||||
'config' => [
|
||||
'type' => 'inline',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_filtervalues',
|
||||
'foreign_field' => 'products',
|
||||
'foreign_table_where' => ' AND {#tx_a2gproducts_domain_model_filtervalues}.{#sys_language_uid} IN (###REC_FIELD_sys_language_uid###,-1) ',
|
||||
'maxitems' => 20,
|
||||
'appearance' => [
|
||||
'collapseAll' => 0,
|
||||
'levelLinksPosition' => 'top',
|
||||
'showSynchronizationLink' => 1,
|
||||
'showPossibleLocalizationRecords' => 1,
|
||||
'showAllLocalizationLink' => 1
|
||||
],
|
||||
],
|
||||
],
|
||||
'rel_selectableattribute' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_selectableattribute',
|
||||
'config' => [
|
||||
'type' => 'inline',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_selectableattribute',
|
||||
'foreign_field' => 'products',
|
||||
'foreign_table_where' => ' AND {#tx_a2gproducts_domain_model_selectableattribute}.{#sys_language_uid} IN (###REC_FIELD_sys_language_uid###,-1) ',
|
||||
'maxitems' => 20,
|
||||
'appearance' => [
|
||||
'collapseAll' => 0,
|
||||
'levelLinksPosition' => 'top',
|
||||
'showSynchronizationLink' => 1,
|
||||
'showPossibleLocalizationRecords' => 1,
|
||||
'showAllLocalizationLink' => 1
|
||||
],
|
||||
],
|
||||
],
|
||||
'rel_ingredients' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_ingredients',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectMultipleSideBySide',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_ingredients',
|
||||
'foreign_table_where' => ' AND {#tx_a2gproducts_domain_model_ingredients}.{#sys_language_uid} IN (###REC_FIELD_sys_language_uid###,-1) AND {#tx_a2gproducts_domain_model_ingredients}.{#pid}=###CURRENT_PID### ',
|
||||
'MM' => 'tx_a2gproducts_products_ingredients_mm',
|
||||
'size' => 10,
|
||||
'autoSizeMax' => 30,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 20,
|
||||
'multiple' => 1,
|
||||
'fieldControl' => [
|
||||
'editPopup' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'addRecord' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'listModule' => [
|
||||
'disabled' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'rel_productvariants' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_productvariants',
|
||||
'config' => [
|
||||
'type' => 'inline',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_productvariants',
|
||||
'foreign_table_where' => ' AND tx_a2gproducts_domain_model_productvariants.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1) AND tx_a2gproducts_domain_model_productvariants.pid=###CURRENT_PID### ',
|
||||
'foreign_field' => 'product',
|
||||
'size' => 10,
|
||||
'autoSizeMax' => 30,
|
||||
'foreign_sortby' => 'sorting',
|
||||
'minitems' => 1,
|
||||
'maxitems' => 20,
|
||||
'appearance' => [
|
||||
'collapseAll' => 1,
|
||||
'expandSingle' => 1,
|
||||
],
|
||||
],
|
||||
],
|
||||
'rel_brand' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_brand',
|
||||
'config' => [
|
||||
'type' => 'group',
|
||||
'internal_type' => 'db',
|
||||
'allowed' => 'tx_a2gproducts_domain_model_brands',
|
||||
'maxitems' => 1,
|
||||
'minitems' => 0,
|
||||
'size' => 1,
|
||||
'default' => 0,
|
||||
'suggestOptions' => [
|
||||
'default' => [
|
||||
'additionalSearchFields' => 'title',
|
||||
'addWhere' => 'AND tx_a2gproducts_domain_model_brands.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1) AND tx_a2gproducts_domain_model_brands.pid=###CURRENT_PID###'
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
665
Configuration/TCA/tx_a2gproducts_domain_model_productvariants.php
Executable file
665
Configuration/TCA/tx_a2gproducts_domain_model_productvariants.php
Executable file
@ -0,0 +1,665 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2gproducts_domain_model_productvariants',
|
||||
'label' => 'title',
|
||||
'label_userFunc' => \A2G\A2gProducts\User\Tca::class . '->productVariantTitle',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'sortby' => 'sorting',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'versioningWS' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden',
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'nr,title,description',
|
||||
'hideTable' => true,
|
||||
'iconfile' => 'EXT:a2g_products/Resources/Public/Icons/fingerprint-outline-variant.png'
|
||||
],
|
||||
'types' => [
|
||||
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden,product, nr, title, path_segment, description, description_html,'
|
||||
. '--div--;LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:images_tab, tab_icon, image, images,'
|
||||
. '--div--;LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:ingredients_tab, rel_ingredients,'
|
||||
. '--div--;LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:filters_tab, rel_category, rel_filter_values, '
|
||||
. '--div--;LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:selectabel_product_attribute_tab, rel_selectableattribute, '
|
||||
. '--div--;LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:seo_tab, seo_image1x1,seo_image4x3,seo_image16x9,'
|
||||
. '--div--;LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:sizes_tab, rel_sizes,'
|
||||
. '--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
||||
],
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'language'
|
||||
],
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 0,
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_productvariants',
|
||||
'foreign_table_where' => 'AND {#tx_a2gproducts_domain_model_productvariants}.{#pid}=###CURRENT_PID### AND {#tx_a2gproducts_domain_model_productvariants}.{#sys_language_uid} IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
'starttime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
'endtime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'range' => [
|
||||
'upper' => mktime(0, 0, 0, 1, 1, 2038)
|
||||
],
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
'nr' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:product_nr',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim, required',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'title' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:title',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'path_segment' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:slug',
|
||||
'config' => [
|
||||
'type' => 'slug',
|
||||
'size' => 50,
|
||||
'generatorOptions' => [
|
||||
'fields' => ['title'],
|
||||
'fieldSeparator' => '/',
|
||||
'prefixParentPageSlug' => true,
|
||||
'replacements' => [
|
||||
'/' => '',
|
||||
],
|
||||
],
|
||||
'fallbackCharacter' => '-',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'description' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:description',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => 40,
|
||||
'rows' => 15,
|
||||
'eval' => 'trim',
|
||||
'default' => ''
|
||||
]
|
||||
],
|
||||
'description_html' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:description_html',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => 40,
|
||||
'rows' => 15,
|
||||
'eval' => 'trim',
|
||||
'enableRichtext' => true,
|
||||
'default' => ''
|
||||
]
|
||||
],
|
||||
'tab_icon' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tab_icon',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'tab_icon',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'maxitems' => 1
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'image' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:image',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'maxitems' => 1
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'images' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:images',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'images',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'maxitems' => 10
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'gallery' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:gallery',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'images',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'foreign_types' => [
|
||||
'0' => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;LLL:EXT:lang/locallang_tca.xlf:sys_file_reference.imageoverlayPalette;imageoverlayPalette,
|
||||
--palette--;;filePalette'
|
||||
]
|
||||
],
|
||||
'foreign_match_fields' => [
|
||||
'fieldname' => 'gallery',
|
||||
'tablenames' => 'tx_a2gproducts_domain_model_productvariants',
|
||||
'table_local' => 'sys_file',
|
||||
],
|
||||
'maxitems' => 20
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'seo_image1x1' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:seo_image1x1',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'foreign_match_fields' => [
|
||||
'fieldname' => 'seo_image1x1',
|
||||
'tablenames' => 'tx_a2gproducts_domain_model_products',
|
||||
'table_local' => 'sys_file',
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'seo_image4x3' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:seo_image4x3',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'foreign_match_fields' => [
|
||||
'fieldname' => 'seo_image4x3',
|
||||
'tablenames' => 'tx_a2gproducts_domain_model_products',
|
||||
'table_local' => 'sys_file',
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'seo_image16x9' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:seo_image16x9',
|
||||
'config' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getFileFieldTCAConfig(
|
||||
'image',
|
||||
[
|
||||
'appearance' => [
|
||||
'createNewRelationLinkTitle' => 'LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:images.addFileReference'
|
||||
],
|
||||
'overrideChildTca' => [
|
||||
'types' => [
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_UNKNOWN => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_TEXT => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_IMAGE => [
|
||||
'showitem' => '
|
||||
title,
|
||||
description,
|
||||
alternative,
|
||||
crop,
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_AUDIO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_VIDEO => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
\TYPO3\CMS\Core\Resource\File::FILETYPE_APPLICATION => [
|
||||
'showitem' => '
|
||||
--palette--;;filePalette
|
||||
'
|
||||
],
|
||||
],
|
||||
],
|
||||
'foreign_match_fields' => [
|
||||
'fieldname' => 'seo_image16x9',
|
||||
'tablenames' => 'tx_a2gproducts_domain_model_products',
|
||||
'table_local' => 'sys_file',
|
||||
],
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
$GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext']
|
||||
),
|
||||
],
|
||||
'rel_category' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_category',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectMultipleSideBySide',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_categories',
|
||||
'foreign_table_where' => ' AND {#tx_a2gproducts_domain_model_categories}.{#sys_language_uid} IN (###REC_FIELD_sys_language_uid###,-1) AND {#tx_a2gproducts_domain_model_categories}.{#pid}=###CURRENT_PID### ',
|
||||
'MM' => 'tx_a2gproducts_productvariants_categories_mm',
|
||||
'size' => 10,
|
||||
'autoSizeMax' => 30,
|
||||
'maxitems' => 20,
|
||||
'multiple' => 1,
|
||||
'fieldControl' => [
|
||||
'editPopup' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'addRecord' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'listModule' => [
|
||||
'disabled' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'rel_filter_values' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_filter_values',
|
||||
'config' => [
|
||||
'type' => 'inline',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_filtervalues',
|
||||
'foreign_field' => 'productvariants',
|
||||
'foreign_table_where' => ' AND {#tx_a2gproducts_domain_model_filtervalues}.{#sys_language_uid} IN (###REC_FIELD_sys_language_uid###,-1) ',
|
||||
'maxitems' => 20,
|
||||
'appearance' => [
|
||||
'collapseAll' => 0,
|
||||
'levelLinksPosition' => 'top',
|
||||
'showSynchronizationLink' => 1,
|
||||
'showPossibleLocalizationRecords' => 1,
|
||||
'showAllLocalizationLink' => 1
|
||||
],
|
||||
],
|
||||
],
|
||||
'rel_selectableattribute' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_selectableattribute',
|
||||
'config' => [
|
||||
'type' => 'inline',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_selectableattribute',
|
||||
'foreign_field' => 'productvariants',
|
||||
'foreign_table_where' => ' AND {#tx_a2gproducts_domain_model_selectableattribute}.{#sys_language_uid} IN (###REC_FIELD_sys_language_uid###,-1) ',
|
||||
'maxitems' => 20,
|
||||
'appearance' => [
|
||||
'collapseAll' => 0,
|
||||
'levelLinksPosition' => 'top',
|
||||
'showSynchronizationLink' => 1,
|
||||
'showPossibleLocalizationRecords' => 1,
|
||||
'showAllLocalizationLink' => 1
|
||||
],
|
||||
],
|
||||
],
|
||||
'rel_ingredients' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_ingredients',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectMultipleSideBySide',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_ingredients',
|
||||
'foreign_table_where' => ' AND {#tx_a2gproducts_domain_model_ingredients}.{#sys_language_uid} IN (###REC_FIELD_sys_language_uid###,-1) AND {#tx_a2gproducts_domain_model_ingredients}.{#pid}=###CURRENT_PID### ',
|
||||
'MM' => 'tx_a2gproducts_ingredients_productvariants_mm',
|
||||
'size' => 10,
|
||||
'autoSizeMax' => 30,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 20,
|
||||
'multiple' => 1,
|
||||
'fieldControl' => [
|
||||
'editPopup' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'addRecord' => [
|
||||
'disabled' => false,
|
||||
],
|
||||
'listModule' => [
|
||||
'disabled' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'product' => [
|
||||
'config' => array(
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_products',
|
||||
),
|
||||
],
|
||||
'rel_sizes' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_sizes',
|
||||
'config' => [
|
||||
'type' => 'inline',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_productvariantsizes',
|
||||
'foreign_table_where' => ' AND tx_a2gproducts_domain_model_productvariantsizes.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1) AND tx_a2gproducts_domain_model_productvariantsizes.pid=###CURRENT_PID### ',
|
||||
'foreign_field' => 'productvariant',
|
||||
'size' => 10,
|
||||
'autoSizeMax' => 30,
|
||||
'foreign_sortby' => 'sorting',
|
||||
'minitems' => 0,
|
||||
'maxitems' => 30,
|
||||
'appearance' => [
|
||||
'collapseAll' => 1,
|
||||
'expandSingle' => 1,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
158
Configuration/TCA/tx_a2gproducts_domain_model_productvariantsizes.php
Executable file
158
Configuration/TCA/tx_a2gproducts_domain_model_productvariantsizes.php
Executable file
@ -0,0 +1,158 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2gproducts_domain_model_productvariantsizes',
|
||||
'label' => 'title',
|
||||
// 'label_userFunc' => \A2G\A2gProducts\User\Tca::class . '->productVariantTitle',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'sortby' => 'sorting',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'versioningWS' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'delete' => 'deleted',
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden',
|
||||
'starttime' => 'starttime',
|
||||
'endtime' => 'endtime',
|
||||
],
|
||||
'searchFields' => 'nr,title,description',
|
||||
'hideTable' => true,
|
||||
'iconfile' => 'EXT:a2g_products/Resources/Public/Icons/fingerprint-outline-variant.png'
|
||||
],
|
||||
'types' => [
|
||||
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, nr, title, path_segment, description,'
|
||||
. '--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access, starttime, endtime'],
|
||||
],
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'language'
|
||||
],
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 0,
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_productvariantsizes',
|
||||
'foreign_table_where' => 'AND {#tx_a2gproducts_domain_model_productvariantsizes}.{#pid}=###CURRENT_PID### AND {#tx_a2gproducts_domain_model_productvariantsizes}.{#sys_language_uid} IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
'starttime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.starttime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
'endtime' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.endtime',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'renderType' => 'inputDateTime',
|
||||
'eval' => 'datetime,int',
|
||||
'default' => 0,
|
||||
'range' => [
|
||||
'upper' => mktime(0, 0, 0, 1, 1, 2038)
|
||||
],
|
||||
'behaviour' => [
|
||||
'allowLanguageSynchronization' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
'nr' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:product_nr',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim, required',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'title' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:title',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'path_segment' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:slug',
|
||||
'config' => [
|
||||
'type' => 'slug',
|
||||
'size' => 50,
|
||||
'generatorOptions' => [
|
||||
'fields' => ['title'],
|
||||
'fieldSeparator' => '/',
|
||||
'prefixParentPageSlug' => true,
|
||||
'replacements' => [
|
||||
'/' => '',
|
||||
],
|
||||
],
|
||||
'fallbackCharacter' => '-',
|
||||
'default' => ''
|
||||
],
|
||||
],
|
||||
'description' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:description',
|
||||
'config' => [
|
||||
'type' => 'text',
|
||||
'cols' => 40,
|
||||
'rows' => 15,
|
||||
'eval' => 'trim',
|
||||
'default' => ''
|
||||
]
|
||||
],
|
||||
'productvariant' => [
|
||||
'config' => array(
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_productvariants',
|
||||
),
|
||||
],
|
||||
],
|
||||
];
|
116
Configuration/TCA/tx_a2gproducts_domain_model_selectableattribute.php
Executable file
116
Configuration/TCA/tx_a2gproducts_domain_model_selectableattribute.php
Executable file
@ -0,0 +1,116 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'ctrl' => [
|
||||
'title' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2gproducts_domain_model_selectableattribute',
|
||||
'label' => 'title',
|
||||
'label_userFunc' => 'A2G\\A2gProducts\\User\\FilterValuesMatcher->title',
|
||||
'tstamp' => 'tstamp',
|
||||
'crdate' => 'crdate',
|
||||
'cruser_id' => 'cruser_id',
|
||||
'type' => 'rel_filter_option',
|
||||
'versioningWS' => true,
|
||||
'languageField' => 'sys_language_uid',
|
||||
'transOrigPointerField' => 'l10n_parent',
|
||||
'transOrigDiffSourceField' => 'l10n_diffsource',
|
||||
'hideTable' => true,
|
||||
'enablecolumns' => [
|
||||
'disabled' => 'hidden'
|
||||
],
|
||||
'searchFields' => '',
|
||||
'iconfile' => 'EXT:a2g_products/Resources/Public/Icons/tag.png'
|
||||
],
|
||||
'types' => [
|
||||
'1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title,rel_filter_option, rel_filters'],
|
||||
],
|
||||
'columns' => [
|
||||
'sys_language_uid' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.language',
|
||||
'config' => [
|
||||
'type' => 'language'
|
||||
],
|
||||
],
|
||||
'l10n_parent' => [
|
||||
'displayCond' => 'FIELD:sys_language_uid:>:0',
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.l18n_parent',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'default' => 0,
|
||||
'items' => [
|
||||
['', 0],
|
||||
],
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_selectableattribute',
|
||||
'foreign_table_where' => 'AND {#tx_a2gproducts_domain_model_selectableattribute}.{#pid}=###CURRENT_PID### AND {#tx_a2gproducts_domain_model_selectableattribute}.{#sys_language_uid} IN (-1,0)',
|
||||
],
|
||||
],
|
||||
'l10n_diffsource' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'hidden' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.visible',
|
||||
'config' => [
|
||||
'type' => 'check',
|
||||
'renderType' => 'checkboxToggle',
|
||||
'items' => [
|
||||
[
|
||||
0 => '',
|
||||
1 => '',
|
||||
'invertStateDisplay' => true
|
||||
]
|
||||
],
|
||||
],
|
||||
],
|
||||
'title' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:title',
|
||||
'config' => [
|
||||
'type' => 'input',
|
||||
'size' => 30,
|
||||
'eval' => 'trim'
|
||||
]
|
||||
],
|
||||
'rel_filter_option' => [
|
||||
'exclude' => true,
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_filter_option',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_filteroptions',
|
||||
'foreign_table_where' => 'AND tx_a2gproducts_domain_model_filteroptions.filters = ###REC_FIELD_rel_filters### AND tx_a2gproducts_domain_model_filteroptions.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1)',
|
||||
'default' => 0,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
'displayCond' => 'USER:A2G\\A2gProducts\\User\\FilterValuesMatcher->showOptionsSelect',
|
||||
],
|
||||
'rel_filters' => [
|
||||
'exclude' => true,
|
||||
'onChange' => 'reload',
|
||||
'label' => 'LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:rel_filters',
|
||||
'config' => [
|
||||
'type' => 'select',
|
||||
'renderType' => 'selectSingle',
|
||||
'foreign_table' => 'tx_a2gproducts_domain_model_filters',
|
||||
'foreign_table_where' => 'AND tx_a2gproducts_domain_model_filters.filter_type = 3 AND tx_a2gproducts_domain_model_filters.sys_language_uid IN (###REC_FIELD_sys_language_uid###,-1)',
|
||||
'default' => 0,
|
||||
'minitems' => 0,
|
||||
'maxitems' => 1,
|
||||
],
|
||||
],
|
||||
'products' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
'productvariants' => [
|
||||
'config' => [
|
||||
'type' => 'passthrough',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
4
Configuration/TsConfig/Page/All.tsconfig
Executable file
4
Configuration/TsConfig/Page/All.tsconfig
Executable file
@ -0,0 +1,4 @@
|
||||
##################
|
||||
#### TsConfig ####
|
||||
##################
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:a2g_products/Configuration/TsConfig/Page/Wizards.tsconfig">
|
46
Configuration/TsConfig/Page/Wizards.tsconfig
Executable file
46
Configuration/TsConfig/Page/Wizards.tsconfig
Executable file
@ -0,0 +1,46 @@
|
||||
################################
|
||||
#### CONTENT ELEMENT WIZARD ####
|
||||
################################
|
||||
mod.wizards.newContentElement.wizardItems.a2gProducts {
|
||||
after = common, menu, special, forms, plugins
|
||||
header = LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:wizard.group.products
|
||||
elements {
|
||||
a2gproductslist {
|
||||
iconIdentifier = a2g_products-plugin-a2gproductslist
|
||||
title = LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2g_products_a2gproductslist.name
|
||||
description = LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2g_products_a2gproductslist.description
|
||||
tt_content_defValues {
|
||||
CType = list
|
||||
list_type = a2gproducts_a2gproductslist
|
||||
}
|
||||
}
|
||||
a2gproductsdetail {
|
||||
iconIdentifier = a2g_products-plugin-a2gproductsdetail
|
||||
title = LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2g_products_a2gproductsdetail.name
|
||||
description = LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2g_products_a2gproductsdetail.description
|
||||
tt_content_defValues {
|
||||
CType = list
|
||||
list_type = a2gproducts_a2gproductsdetail
|
||||
}
|
||||
}
|
||||
ingredientslist {
|
||||
iconIdentifier = a2g_products-plugin-ingredientslist
|
||||
title = LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2g_products_ingredientslist.name
|
||||
description = LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2g_products_ingredientslist.description
|
||||
tt_content_defValues {
|
||||
CType = list
|
||||
list_type = a2gproducts_ingredientslist
|
||||
}
|
||||
}
|
||||
ingredientsdetail {
|
||||
iconIdentifier = a2g_products-plugin-ingredientsdetail
|
||||
title = LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2g_products_ingredientsdetail.name
|
||||
description = LLL:EXT:a2g_products/Resources/Private/Language/locallang_db.xlf:tx_a2g_products_ingredientsdetail.description
|
||||
tt_content_defValues {
|
||||
CType = list
|
||||
list_type = a2gproducts_ingredientsdetail
|
||||
}
|
||||
}
|
||||
}
|
||||
show = *
|
||||
}
|
14
Configuration/TypoScript/Base/constants.typoscript
Executable file
14
Configuration/TypoScript/Base/constants.typoscript
Executable file
@ -0,0 +1,14 @@
|
||||
plugin.tx_a2gproducts_a2gproducts {
|
||||
view {
|
||||
# cat=altogether products/file; type=string; label=Path to template root (FE)
|
||||
templateRootPath = EXT:a2g_products/Resources/Private/Templates/
|
||||
# cat=altogether products/file; type=string; label=Path to template partials (FE)
|
||||
partialRootPath = EXT:a2g_products/Resources/Private/Partials/
|
||||
# cat=altogether products/file; type=string; label=Path to template layouts (FE)
|
||||
layoutRootPath = EXT:a2g_products/Resources/Private/Layouts/
|
||||
}
|
||||
persistence {
|
||||
# cat=altogether products//a; type=string; label=Default storage PID
|
||||
storagePid =
|
||||
}
|
||||
}
|
115
Configuration/TypoScript/Base/setup.typoscript
Executable file
115
Configuration/TypoScript/Base/setup.typoscript
Executable file
@ -0,0 +1,115 @@
|
||||
plugin.tx_a2gproducts_a2gproductslist {
|
||||
view {
|
||||
templateRootPaths.0 = EXT:a2g_products/Resources/Private/Templates/
|
||||
templateRootPaths.1 = {$plugin.tx_a2gproducts_a2gproducts.view.templateRootPath}
|
||||
partialRootPaths.0 = EXT:a2g_products/Resources/Private/Partials/
|
||||
partialRootPaths.1 = {$plugin.tx_a2gproducts_a2gproducts.view.partialRootPath}
|
||||
layoutRootPaths.0 = EXT:a2g_products/Resources/Private/Layouts/
|
||||
layoutRootPaths.1 = {$plugin.tx_a2gproducts_a2gproducts.view.layoutRootPath}
|
||||
}
|
||||
persistence {
|
||||
storagePid = {$plugin.tx_a2gproducts_a2gproductslist.persistence.storagePid}
|
||||
#recursive = 1
|
||||
}
|
||||
}
|
||||
plugin.tx_a2gproducts_a2gproductsdetail {
|
||||
view {
|
||||
templateRootPaths.0 = EXT:a2g_products/Resources/Private/Templates/
|
||||
templateRootPaths.1 = {$plugin.tx_a2gproducts_a2gproducts.view.templateRootPath}
|
||||
partialRootPaths.0 = EXT:a2g_products/Resources/Private/Partials/
|
||||
partialRootPaths.1 = {$plugin.tx_a2gproducts_a2gproducts.view.partialRootPath}
|
||||
layoutRootPaths.0 = EXT:a2g_products/Resources/Private/Layouts/
|
||||
layoutRootPaths.1 = {$plugin.tx_a2gproducts_a2gproducts.view.layoutRootPath}
|
||||
}
|
||||
persistence {
|
||||
storagePid = {$plugin.tx_a2gproducts_a2gproductsdetail.persistence.storagePid}
|
||||
#recursive = 1
|
||||
}
|
||||
}
|
||||
plugin.tx_a2gproducts_ingredientslist {
|
||||
view {
|
||||
templateRootPaths.0 = EXT:a2g_products/Resources/Private/Templates/
|
||||
templateRootPaths.1 = {$plugin.tx_a2gproducts_a2gproducts.view.templateRootPath}
|
||||
partialRootPaths.0 = EXT:a2g_products/Resources/Private/Partials/
|
||||
partialRootPaths.1 = {$plugin.tx_a2gproducts_a2gproducts.view.partialRootPath}
|
||||
layoutRootPaths.0 = EXT:a2g_products/Resources/Private/Layouts/
|
||||
layoutRootPaths.1 = {$plugin.tx_a2gproducts_a2gproducts.view.layoutRootPath}
|
||||
}
|
||||
persistence {
|
||||
storagePid = {$plugin.tx_a2gproducts_a2gproducts.persistence.storagePid}
|
||||
#recursive = 1
|
||||
}
|
||||
}
|
||||
plugin.tx_a2gproducts_ingredientsdetail {
|
||||
view {
|
||||
templateRootPaths.0 = EXT:a2g_products/Resources/Private/Templates/
|
||||
templateRootPaths.1 = {$plugin.tx_a2gproducts_a2gproducts.view.templateRootPath}
|
||||
partialRootPaths.0 = EXT:a2g_products/Resources/Private/Partials/
|
||||
partialRootPaths.1 = {$plugin.tx_a2gproducts_a2gproducts.view.partialRootPath}
|
||||
layoutRootPaths.0 = EXT:a2g_products/Resources/Private/Layouts/
|
||||
layoutRootPaths.1 = {$plugin.tx_a2gproducts_a2gproducts.view.layoutRootPath}
|
||||
}
|
||||
persistence {
|
||||
storagePid = {$plugin.tx_a2gproducts_a2gproducts.persistence.storagePid}
|
||||
#recursive = 1
|
||||
}
|
||||
}
|
||||
|
||||
page.includeJSFooter.rslider = EXT:a2g_products/Resources/Public/JavaScript/rSlider.min.js
|
||||
page.includeJSFooter.rslider {
|
||||
disableCompression = 0
|
||||
excludeFromConcatenation = 0
|
||||
}
|
||||
page.includeJSFooter.a2gProductsList = EXT:a2g_products/Resources/Public/JavaScript/a2gProductsList.js
|
||||
page.includeJSFooter.a2gProductsList {
|
||||
disableCompression = 0
|
||||
excludeFromConcatenation = 0
|
||||
}
|
||||
page.includeJSFooter.a2gProductsSwiperInit = EXT:a2g_products/Resources/Public/JavaScript/a2gProductsSwiper.init.js
|
||||
page.includeJSFooter.a2gProductsSwiperInit {
|
||||
disableCompression = 0
|
||||
excludeFromConcatenation = 0
|
||||
}
|
||||
|
||||
page.includeCSS {
|
||||
rslider = EXT:a2g_products/Resources/Public/Scss/rSlider.min.scss
|
||||
a2gProductsList = EXT:a2g_products/Resources/Public/Scss/a2gProductsList.scss
|
||||
}
|
||||
|
||||
a2gProductList = PAGE
|
||||
a2gProductList {
|
||||
typeNum = 1629140329
|
||||
config {
|
||||
disableAllHeaderCode = 1
|
||||
admPanel = 0
|
||||
additionalHeaders.10.header = Content-type:text/html
|
||||
xhtml_cleaning = 0
|
||||
debug = 0
|
||||
no_cache = 1
|
||||
}
|
||||
10 = USER
|
||||
10 {
|
||||
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
|
||||
extensionName = A2gProducts
|
||||
pluginName = A2gproductslist
|
||||
vendorName = Altogether
|
||||
controller = Products
|
||||
settings < plugin.tx_a2gproducts_a2gproductslist.settings
|
||||
persistence < plugin.tx_a2gproducts_a2gproductslist.persistence
|
||||
view < plugin.tx_a2gproducts_a2gproductslist.view
|
||||
}
|
||||
}
|
||||
|
||||
config.pageTitleProviders {
|
||||
product {
|
||||
provider = A2G\A2gProducts\PageTitle\A2gPageTitleProvider
|
||||
before = seo
|
||||
}
|
||||
seo {
|
||||
provider = TYPO3\CMS\Seo\PageTitle\SeoTitlePageTitleProvider
|
||||
before = record
|
||||
}
|
||||
}
|
||||
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:a2g_products/Configuration/TypoScript/Canonical/setup.typoscript">
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:a2g_products/Configuration/TypoScript/Breadcrumb/setup.typoscript">
|
41
Configuration/TypoScript/Breadcrumb/setup.typoscript
Executable file
41
Configuration/TypoScript/Breadcrumb/setup.typoscript
Executable file
@ -0,0 +1,41 @@
|
||||
[traverse(request.getQueryParams(), 'tx_a2gproducts_a2gproductsdetail/product') > 0]
|
||||
page {
|
||||
10 {
|
||||
variables {
|
||||
breadcrumbExtendedValue = COA
|
||||
breadcrumbExtendedValue {
|
||||
10 = USER
|
||||
10 {
|
||||
userFunc = A2G\A2gProducts\User\TypoScript->productBreadrumb
|
||||
}
|
||||
}
|
||||
}
|
||||
dataProcessing {
|
||||
30 {
|
||||
special.range = 0|-2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
[end]
|
||||
|
||||
[traverse(request.getQueryParams(), 'tx_a2gproducts_ingredientsdetail/ingredient') > 0]
|
||||
page {
|
||||
10 {
|
||||
variables {
|
||||
breadcrumbExtendedValue = COA
|
||||
breadcrumbExtendedValue {
|
||||
10 = USER
|
||||
10 {
|
||||
userFunc = A2G\A2gProducts\User\TypoScript->ingredientBreadrumb
|
||||
}
|
||||
}
|
||||
}
|
||||
dataProcessing {
|
||||
30 {
|
||||
special.range = 0|-2
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
[end]
|
48
Configuration/TypoScript/Canonical/setup.typoscript
Executable file
48
Configuration/TypoScript/Canonical/setup.typoscript
Executable file
@ -0,0 +1,48 @@
|
||||
[traverse(request.getQueryParams(), 'tx_a2gproducts_a2gproductsdetail/product') > 0]
|
||||
page.headerData.20 = TEXT
|
||||
page.headerData.20 {
|
||||
typolink {
|
||||
# hol die aktuelle Page Id
|
||||
parameter.data = page:uid
|
||||
# prüfe ob die Id wirklich eine Zahl ist
|
||||
parameter.intval = 1
|
||||
useCacheHash = 1
|
||||
# füge zur URL alle Parameter hinzu
|
||||
additionalParams.cObject = COA
|
||||
additionalParams.cObject {
|
||||
10 = TEXT
|
||||
10.dataWrap = &tx_a2gproducts_a2gproductsdetail[product]={GP:tx_a2gproducts_a2gproductsdetail|product}
|
||||
10.if.isTrue.data = GP:tx_a2gproducts_a2gproductsdetail|product
|
||||
}
|
||||
forceAbsoluteUrl = 1
|
||||
returnLast = url
|
||||
}
|
||||
# bau mir den Meta-Tag zusammen
|
||||
wrap = <link rel="canonical" href="|">
|
||||
}
|
||||
[global]
|
||||
|
||||
|
||||
[traverse(request.getQueryParams(), 'tx_a2gproducts_ingredientsdetail/ingredient') > 0]
|
||||
page.headerData.20 = TEXT
|
||||
page.headerData.20 {
|
||||
typolink {
|
||||
# hol die aktuelle Page Id
|
||||
parameter.data = page:uid
|
||||
# prüfe ob die Id wirklich eine Zahl ist
|
||||
parameter.intval = 1
|
||||
useCacheHash = 1
|
||||
# füge zur URL alle Parameter hinzu
|
||||
additionalParams.cObject = COA
|
||||
additionalParams.cObject {
|
||||
10 = TEXT
|
||||
10.dataWrap = &tx_a2gproducts_ingredientsdetail[ingredient]={GP:tx_a2gproducts_ingredientsdetail|ingredient}
|
||||
10.if.isTrue.data = GP:tx_a2gproducts_ingredientsdetail|ingredient
|
||||
}
|
||||
forceAbsoluteUrl = 1
|
||||
returnLast = url
|
||||
}
|
||||
# bau mir den Meta-Tag zusammen
|
||||
wrap = <link rel="canonical" href="|">
|
||||
}
|
||||
[global]
|
0
Configuration/TypoScript/GoogleAnalytics/constants.typoscript
Executable file
0
Configuration/TypoScript/GoogleAnalytics/constants.typoscript
Executable file
46
Configuration/TypoScript/GoogleAnalytics/setup.typoscript
Executable file
46
Configuration/TypoScript/GoogleAnalytics/setup.typoscript
Executable file
@ -0,0 +1,46 @@
|
||||
page.includeJSFooter.gaCheckout = EXT:a2g_products/Resources/Public/JavaScript/GoogleAnalytics/google-analytics/GaCheckout.js
|
||||
page.includeJSFooter.gaCheckout {
|
||||
disableCompression = 0
|
||||
excludeFromConcatenation = 0
|
||||
}
|
||||
page.includeJSFooter.gaProduct = EXT:a2g_products/Resources/Public/JavaScript/GoogleAnalytics/google-analytics/GaProduct.js
|
||||
page.includeJSFooter.gaProduct {
|
||||
disableCompression = 0
|
||||
excludeFromConcatenation = 0
|
||||
}
|
||||
page.includeJSFooter.gaProducts = EXT:a2g_products/Resources/Public/JavaScript/GoogleAnalytics/google-analytics/GaProducts.js
|
||||
page.includeJSFooter.gaProducts {
|
||||
disableCompression = 0
|
||||
excludeFromConcatenation = 0
|
||||
}
|
||||
page.includeJSFooter.gaPromotion = EXT:a2g_products/Resources/Public/JavaScript/GoogleAnalytics/google-analytics/GaPromotion.js
|
||||
page.includeJSFooter.gaPromotion {
|
||||
disableCompression = 0
|
||||
excludeFromConcatenation = 0
|
||||
}
|
||||
page.includeJSFooter.gaPromotions = EXT:a2g_products/Resources/Public/JavaScript/GoogleAnalytics/google-analytics/GaPromotions.js
|
||||
page.includeJSFooter.gaPromotions {
|
||||
disableCompression = 0
|
||||
excludeFromConcatenation = 0
|
||||
}
|
||||
page.includeJSFooter.gaPurchase = EXT:a2g_products/Resources/Public/JavaScript/GoogleAnalytics/google-analytics/GaPurchase.js
|
||||
page.includeJSFooter.gaPurchase {
|
||||
disableCompression = 0
|
||||
excludeFromConcatenation = 0
|
||||
}
|
||||
page.includeJSFooter.gaRefund = EXT:a2g_products/Resources/Public/JavaScript/GoogleAnalytics/google-analytics/GaRefund.js
|
||||
page.includeJSFooter.gaRefund {
|
||||
disableCompression = 0
|
||||
excludeFromConcatenation = 0
|
||||
}
|
||||
page.includeJSFooter.gaRefunds = EXT:a2g_products/Resources/Public/JavaScript/GoogleAnalytics/google-analytics/GaRefunds.js
|
||||
page.includeJSFooter.gaRefunds {
|
||||
disableCompression = 0
|
||||
excludeFromConcatenation = 0
|
||||
}
|
||||
|
||||
page.includeJSFooter.gaEcommerce = EXT:a2g_products/Resources/Public/JavaScript/GoogleAnalytics/A2gGaEcommerce.js
|
||||
page.includeJSFooter.gaEcommerce {
|
||||
disableCompression = 1
|
||||
excludeFromConcatenation = 1
|
||||
}
|
2
Configuration/TypoScript/constants.typoscript
Executable file
2
Configuration/TypoScript/constants.typoscript
Executable file
@ -0,0 +1,2 @@
|
||||
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:a2g_products/Configuration/TypoScript/Base/constants.typoscript">
|
3
Configuration/TypoScript/setup.typoscript
Executable file
3
Configuration/TypoScript/setup.typoscript
Executable file
@ -0,0 +1,3 @@
|
||||
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:a2g_products/Configuration/TypoScript/Base/setup.typoscript">
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:a2g_products/Configuration/TypoScript/GoogleAnalytics/setup.typoscript">
|
9
LICENSE
Executable file
9
LICENSE
Executable file
@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) <year> <copyright holders>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
11
Resources/Private/.htaccess
Executable file
11
Resources/Private/.htaccess
Executable file
@ -0,0 +1,11 @@
|
||||
# Apache < 2.3
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy All
|
||||
</IfModule>
|
||||
|
||||
# Apache >= 2.3
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
36
Resources/Private/Language/de.locallang.xlf
Executable file
36
Resources/Private/Language/de.locallang.xlf
Executable file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<file source-language="en" target-language="de" datatype="plaintext" original="EXT:a2g_products/Resources/Private/Language/locallang.xlf" date="2021-11-18T10:42:07Z" product-name="a2g_products">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="product_list.product_detail_link" resname="product_list.product_detail_link">
|
||||
<source>detail</source>
|
||||
<target>mehr erfahren</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="product.product_nr" resname="product.product_nr">
|
||||
<source>article nr</source>
|
||||
<target>Artikel Nr</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="product_list.search" resname="product_list.search">
|
||||
<source>search</source>
|
||||
<target>suchen</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="product_list.advanced_search" resname="product_list.advanced_search">
|
||||
<source>advanced search</source>
|
||||
<target>erweiterte Suche</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="product_list.search_input_placeholder" resname="product_list.search_input_placeholder">
|
||||
<source>search</source>
|
||||
<target>suche</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="related_products" resname="related_products">
|
||||
<source>related products</source>
|
||||
<target>Produkte mit dieser Zutat</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="used_ingredients" resname="used_ingredients">
|
||||
<source>used ingredients</source>
|
||||
<target>Verwendete Zutaten</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<file source-language="en" target-language="de" datatype="plaintext" original="EXT:a2g_products/Resources/Private/Language/locallang_csh_tx_a2gproducts_domain_model_products.xlf" date="2021-11-18T11:17:01Z" product-name="a2g_products">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="nr.description" resname="nr.description">
|
||||
<source>product nr</source>
|
||||
<target>Produkt Nr</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="title.description" resname="title.description">
|
||||
<source>product title <br/>
|
||||
for Search Engin Optimation ( SEO ) and link preview ( <a href="https://ogp.me/">open graph</a> )</source>
|
||||
<target>Produkt Titel / Name <br/>
|
||||
für Suchmaschinenoptimierung ( SEO ) und Link-Vorschau ( <a href="https://ogp.me/">open graph</a> )</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="description.description" resname="description.description">
|
||||
<source>description <br/>
|
||||
for Search Engin Optimation ( SEO ) and link preview ( <a href="https://ogp.me/">open graph</a> )</source>
|
||||
<target>Produkt Beschreibung <br/>
|
||||
für Suchmaschinenoptimierung ( SEO ) und Link-Vorschau ( <a href="https://ogp.me/">open graph</a> )</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="image.description" resname="image.description">
|
||||
<source>product list image <br/>
|
||||
for Search Engin Optimation ( SEO ) and link preview ( <a href="https://ogp.me/">open graph</a> )</source>
|
||||
<target>Produkt Listen Bild <br/>
|
||||
für Suchmaschinenoptimierung ( SEO ) und Link-Vorschau ( <a href="https://ogp.me/">open graph</a> )</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="images.description" resname="images.description">
|
||||
<source>images</source>
|
||||
<target>Produkt Detail Seiten Bild Slider</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_category.description" resname="rel_category.description">
|
||||
<source>relCategory</source>
|
||||
<target>Produkt Kategorie ( Verwendet für Filter )</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_filter_values.description" resname="rel_filter_values.description">
|
||||
<source>relFilterValues</source>
|
||||
<target>Filterbare Optionen
|
||||
von dem FIlter aus der Kategorie</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="path_segment.description" resname="path_segment.description">
|
||||
<source>url segment generated from the product title</source>
|
||||
<target>URL Segment generiert aus dem Produk-Titel</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="description_html.description" resname="description_html.description">
|
||||
<source>farmateable description </source>
|
||||
<target>Formatierbare Beschreibung unter der Beschreibung</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_ingedients.description" resname="rel_ingedients.description">
|
||||
<source>ingredients</source>
|
||||
<target>Verwendete Inhaltsstoffe, Bauteile oder Zutaten</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_productvariants.description" resname="rel_productvariants.description">
|
||||
<source></source>
|
||||
<target></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_delivery_costs.description" resname="rel_delivery_costs.description">
|
||||
<source>deliverycosts conditions per each product</source>
|
||||
<target>Liefergebühren abzüge zuschläge pro Produkt</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
308
Resources/Private/Language/de.locallang_db.xlf
Executable file
308
Resources/Private/Language/de.locallang_db.xlf
Executable file
@ -0,0 +1,308 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<file source-language="en" target-language="de" datatype="plaintext" original="EXT:a2g_products/Resources/Private/Language/locallang_db.xlf" date="2022-01-25T14:39:22Z" product-name="a2g_products">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_brands" resname="tx_a2gproducts_domain_model_brands">
|
||||
<source>Brands</source>
|
||||
<target>Marken / Kollektionen</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="wizard.group.products" resname="wizard.group.products">
|
||||
<source>Products</source>
|
||||
<target>Produkte</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products" resname="tx_a2gproducts_domain_model_products">
|
||||
<source>Products</source>
|
||||
<target>Produkte</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.nr" resname="tx_a2gproducts_domain_model_products.nr">
|
||||
<source>Nr</source>
|
||||
<target></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.title" resname="tx_a2gproducts_domain_model_products.title">
|
||||
<source>Title</source>
|
||||
<target>Titel</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.description" resname="tx_a2gproducts_domain_model_products.description">
|
||||
<source>Description</source>
|
||||
<target>Beschreibung</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.image" resname="tx_a2gproducts_domain_model_products.image">
|
||||
<source>Image</source>
|
||||
<target>Bild</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.images" resname="tx_a2gproducts_domain_model_products.images">
|
||||
<source>Images</source>
|
||||
<target>Bilder</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.net_price" resname="tx_a2gproducts_domain_model_products.net_price">
|
||||
<source>Net Price</source>
|
||||
<target>Netto Preis</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.gross_price" resname="tx_a2gproducts_domain_model_products.gross_price">
|
||||
<source>Gross Price</source>
|
||||
<target>Brutto Preis</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.rel_category" resname="tx_a2gproducts_domain_model_products.rel_category">
|
||||
<source>Category</source>
|
||||
<target>Kategorie</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.rel_filter_values" resname="tx_a2gproducts_domain_model_products.rel_filter_values">
|
||||
<source>Filter Values</source>
|
||||
<target>Filter Werte</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_categories" resname="tx_a2gproducts_domain_model_categories">
|
||||
<source>Categories</source>
|
||||
<target>Kategorien</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_categories.title" resname="tx_a2gproducts_domain_model_categories.title">
|
||||
<source>Title</source>
|
||||
<target>Titel</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_categories.description" resname="tx_a2gproducts_domain_model_categories.description">
|
||||
<source>Description</source>
|
||||
<target>Beschreibung</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_categories.image" resname="tx_a2gproducts_domain_model_categories.image">
|
||||
<source>Image</source>
|
||||
<target>Bild</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_categories.rel_filters" resname="tx_a2gproducts_domain_model_categories.rel_filters">
|
||||
<source>Filters</source>
|
||||
<target>Filter</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filters" resname="tx_a2gproducts_domain_model_filters">
|
||||
<source>Filters</source>
|
||||
<target>Filter</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filters.title" resname="tx_a2gproducts_domain_model_filters.title">
|
||||
<source>Title</source>
|
||||
<target>Titel</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filters.filter_type" resname="tx_a2gproducts_domain_model_filters.filter_type">
|
||||
<source>Filter Type</source>
|
||||
<target>Filter Typ</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filters.db_operation_max" resname="tx_a2gproducts_domain_model_filters.db_operation_max">
|
||||
<source>Db Operation Max</source>
|
||||
<target>Db Operation Max</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filters.db_operation_min" resname="tx_a2gproducts_domain_model_filters.db_operation_min">
|
||||
<source>Db Operation Min</source>
|
||||
<target>Db Operation Min</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filters.rel_filter_option" resname="tx_a2gproducts_domain_model_filters.rel_filter_option">
|
||||
<source>Filter Option</source>
|
||||
<target>Filter Option</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filteroptions" resname="tx_a2gproducts_domain_model_filteroptions">
|
||||
<source>Filter Options</source>
|
||||
<target>Filter Optionen</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filteroptions.title" resname="tx_a2gproducts_domain_model_filteroptions.title">
|
||||
<source>Title</source>
|
||||
<target>Titel</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filteroptions.value_min" resname="tx_a2gproducts_domain_model_filteroptions.value_min">
|
||||
<source>Value Min</source>
|
||||
<target>min. Wert</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filteroptions.value_max" resname="tx_a2gproducts_domain_model_filteroptions.value_max">
|
||||
<source>Value Max</source>
|
||||
<target>max. Wert</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filtervalues" resname="tx_a2gproducts_domain_model_filtervalues">
|
||||
<source>Filter Values</source>
|
||||
<target>Filter Werte</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filtervalues.value" resname="tx_a2gproducts_domain_model_filtervalues.value">
|
||||
<source>Value</source>
|
||||
<target>Wert</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filtervalues.rel_filters" resname="tx_a2gproducts_domain_model_filtervalues.rel_filters">
|
||||
<source>Filters</source>
|
||||
<target>Filter</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_a2gproductslist.name" resname="tx_a2g_products_a2gproductslist.name">
|
||||
<source>Altogether Products - Product List</source>
|
||||
<target>Altogether Produkte - Produktliste</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_a2gproductslist.description" resname="tx_a2g_products_a2gproductslist.description">
|
||||
<source></source>
|
||||
<target>Liste der Produkte mit filter und such Möglichkeit.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_a2gproductsdetail.name" resname="tx_a2g_products_a2gproductsdetail.name">
|
||||
<source>Altogether Products - Product Detail</source>
|
||||
<target>Altogether Produkte - Produkt Detail Seite</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_a2gproductsdetail.description" resname="tx_a2g_products_a2gproductsdetail.description">
|
||||
<source></source>
|
||||
<target>Detailseite eines Produktes</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_ingredientslist.name" resname="tx_a2g_products_ingredientslist.name">
|
||||
<source>Altogether Products - Ingredients List</source>
|
||||
<target>Altogether Produkte - Liste der Inhaltsstoffe</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_ingredientslist.description" resname="tx_a2g_products_ingredientslist.description">
|
||||
<source></source>
|
||||
<target></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_ingredientsdetail.name" resname="tx_a2g_products_ingredientsdetail.name">
|
||||
<source>Altogether Products - Ingredients Detail</source>
|
||||
<target>Altogether Produkte - Inhaltsstoffe Detail Seite</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_ingredientsdetail.description" resname="tx_a2g_products_ingredientsdetail.description">
|
||||
<source></source>
|
||||
<target></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_ingredients" resname="tx_a2gproducts_domain_model_ingredients">
|
||||
<source>Ingredients</source>
|
||||
<target>Inhaltstoffe</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="title" resname="title">
|
||||
<source>title</source>
|
||||
<target>Titel</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="description" resname="description">
|
||||
<source>description</source>
|
||||
<target>Beschreibung</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="image" resname="image">
|
||||
<source>image</source>
|
||||
<target>Bild</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_filters" resname="rel_filters">
|
||||
<source>Filters</source>
|
||||
<target>Filter</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="value_min" resname="value_min">
|
||||
<source>min value</source>
|
||||
<target>min. Wert</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="value_max" resname="value_max">
|
||||
<source>max value</source>
|
||||
<target>max. Wert</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="filter_type" resname="filter_type">
|
||||
<source>filter type</source>
|
||||
<target>Filter Typ</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="db_operation_min" resname="db_operation_min">
|
||||
<source>operation min</source>
|
||||
<target>min. Operant</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="db_operation_max" resname="db_operation_max">
|
||||
<source>operation max</source>
|
||||
<target>max. Operant</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_filter_option" resname="rel_filter_option">
|
||||
<source>filter option</source>
|
||||
<target>Filter Optionen</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="value" resname="value">
|
||||
<source>value</source>
|
||||
<target>Wert</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="images" resname="images">
|
||||
<source>images</source>
|
||||
<target>Bilder</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_products" resname="rel_products">
|
||||
<source>products</source>
|
||||
<target>Produkte</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="product_nr" resname="product_nr">
|
||||
<source>product nr</source>
|
||||
<target>Produkt Nr.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_category" resname="rel_category">
|
||||
<source>category</source>
|
||||
<target>Kateogie</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_filter_values" resname="rel_filter_values">
|
||||
<source>filter values</source>
|
||||
<target>Filter Werte</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_ingredients" resname="rel_ingredients">
|
||||
<source>ingredients</source>
|
||||
<target>Inhaltsstoffe</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="used_ingredients" resname="used_ingredients">
|
||||
<source>used ingredients</source>
|
||||
<target>verwendete Zutaten</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="related_products" resname="related_products">
|
||||
<source>products with this ingredient</source>
|
||||
<target>Produkte mit dieser Zutat</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="filter_type.useFilterOptions" resname="filter_type.useFilterOptions">
|
||||
<source>just use Filter Options</source>
|
||||
<target>Filteroptionen verwenden</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="slug" resname="slug">
|
||||
<source>slug</source>
|
||||
<target>Url Segment</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="images_tab" resname="images_tab">
|
||||
<source>Images</source>
|
||||
<target>Bilder</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="product_variants_tab" resname="product_variants_tab">
|
||||
<source>Varainats</source>
|
||||
<target>Varianten</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="filters_tab" resname="filters_tab">
|
||||
<source>Filters</source>
|
||||
<target>Filter</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ingredients_tab" resname="ingredients_tab">
|
||||
<source>Ingredients</source>
|
||||
<target>Inhaltsstoffe</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="sizes_tab" resname="images_tab">
|
||||
<source>Sizes</source>
|
||||
<target>Größen</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_productvariants" resname="rel_productvariants">
|
||||
<source>Product-Variants</source>
|
||||
<target>Produkt Varianten</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="description_html" resname="description_html">
|
||||
<source>Description ( RTE )</source>
|
||||
<target>Beschreibung ( RTE )</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="selectabel_product_attribute_tab" resname="selectabel_product_attribute_tab">
|
||||
<source>Product Options</source>
|
||||
<target>Produkt Optionen</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_selectableattribute" resname="rel_selectableattribute">
|
||||
<source>Selectable Produkt Options</source>
|
||||
<target>Wählbare Produkt Optionen</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_brand" resname="rel_brand">
|
||||
<source>Brand</source>
|
||||
<target>Marke</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_brands" resname="tx_a2gproducts_domain_model_brands">
|
||||
<source>Brands</source>
|
||||
<target>Marken</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="seo_image1x1" resname="seo_image1x1">
|
||||
<source>SEO Image 1x1</source>
|
||||
<target></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="seo_image4x3" resname="seo_image4x3">
|
||||
<source>SEO Image 4x3</source>
|
||||
<target></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="seo_image16x9" resname="seo_image16x9">
|
||||
<source>SEO Image 16x9</source>
|
||||
<target></target>
|
||||
</trans-unit>
|
||||
<trans-unit id="seo_tab" resname="seo_tab">
|
||||
<source>SEO</source>
|
||||
<target></target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
29
Resources/Private/Language/locallang.xlf
Executable file
29
Resources/Private/Language/locallang.xlf
Executable file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<file source-language="en" datatype="plaintext" original="EXT:a2g_products/Resources/Private/Language/locallang.xlf" date="2021-11-18T10:42:07Z" product-name="a2g_products">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="product_list.product_detail_link" resname="product_list.product_detail_link">
|
||||
<source>detail</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="product.product_nr" resname="product.product_nr">
|
||||
<source>article nr</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="product_list.search" resname="product_list.search">
|
||||
<source>search</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="product_list.advanced_search" resname="product_list.advanced_search">
|
||||
<source>advanced search</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="product_list.search_input_placeholder" resname="product_list.search_input_placeholder">
|
||||
<source>search</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="related_products" resname="related_products">
|
||||
<source>related products</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="used_ingredients" resname="used_ingredients">
|
||||
<source>used ingredients</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="EXT:a2g_products/Resources/Private/Language/locallang_csh" date="2021-08-16T12:03:54Z" product-name="a2g_products">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="title.description" resname="title.description">
|
||||
<source>title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="description.description" resname="description.description">
|
||||
<source>description</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="image.description" resname="image.description">
|
||||
<source>image</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_filters.description" resname="rel_filters.description">
|
||||
<source>relFilters</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="EXT:a2g_products/Resources/Private/Language/locallang_csh" date="2021-08-16T12:03:54Z" product-name="a2g_products">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="title.description" resname="title.description">
|
||||
<source>title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="value_min.description" resname="value_min.description">
|
||||
<source>valueMin</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="value_max.description" resname="value_max.description">
|
||||
<source>valueMax</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="EXT:a2g_products/Resources/Private/Language/locallang_csh" date="2021-08-16T12:03:54Z" product-name="a2g_products">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="title.description" resname="title.description">
|
||||
<source>title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="filter_type.description" resname="filter_type.description">
|
||||
<source>filterType</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="db_operation_max.description" resname="db_operation_max.description">
|
||||
<source>dbOperationMax</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="db_operation_min.description" resname="db_operation_min.description">
|
||||
<source>dbOperationMin</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_filter_option.description" resname="rel_filter_option.description">
|
||||
<source>relFilterOption</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<xliff version="1.0">
|
||||
<file source-language="en" datatype="plaintext" original="EXT:a2g_products/Resources/Private/Language/locallang_csh" date="2021-08-16T12:03:54Z" product-name="a2g_products">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="value.description" resname="value.description">
|
||||
<source>value</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_filters.description" resname="rel_filters.description">
|
||||
<source>relFilters</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<file source-language="en" datatype="plaintext" original="EXT:a2g_products/Resources/Private/Language/locallang_csh_tx_a2gproducts_domain_model_products.xlf" date="2021-11-18T11:17:01Z" product-name="a2g_products">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="nr.description" resname="nr.description">
|
||||
<source>product nr</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="title.description" resname="title.description">
|
||||
<source>product title <br/>
|
||||
for Search Engin Optimation ( SEO ) and link preview ( <a href="https://ogp.me/">open graph</a> )</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="description.description" resname="description.description">
|
||||
<source>description <br/>
|
||||
for Search Engin Optimation ( SEO ) and link preview ( <a href="https://ogp.me/">open graph</a> )</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="image.description" resname="image.description">
|
||||
<source>product list image <br/>
|
||||
for Search Engin Optimation ( SEO ) and link preview ( <a href="https://ogp.me/">open graph</a> )</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="images.description" resname="images.description">
|
||||
<source>images</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_category.description" resname="rel_category.description">
|
||||
<source>relCategory</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_filter_values.description" resname="rel_filter_values.description">
|
||||
<source>relFilterValues</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="path_segment.description" resname="path_segment.description">
|
||||
<source>url segment generated from the product title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="description_html.description" resname="description_html.description">
|
||||
<source>farmateable description </source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_ingedients.description" resname="rel_ingedients.description">
|
||||
<source>ingredients</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_productvariants.description" resname="rel_productvariants.description">
|
||||
<source></source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_delivery_costs.description" resname="rel_delivery_costs.description">
|
||||
<source>deliverycosts conditions per each product</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
221
Resources/Private/Language/locallang_db.xlf
Executable file
221
Resources/Private/Language/locallang_db.xlf
Executable file
@ -0,0 +1,221 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<file source-language="en" datatype="plaintext" original="EXT:a2g_products/Resources/Private/Language/locallang_db.xlf" date="2021-11-14T20:20:24Z" product-name="a2g_products">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_brands" resname="tx_a2gproducts_domain_model_brands">
|
||||
<source>Brands</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="wizard.group.products" resname="wizard.group.products">
|
||||
<source>Products</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products" resname="tx_a2gproducts_domain_model_products">
|
||||
<source>Products</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.nr" resname="tx_a2gproducts_domain_model_products.nr">
|
||||
<source>Nr</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.title" resname="tx_a2gproducts_domain_model_products.title">
|
||||
<source>Title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.description" resname="tx_a2gproducts_domain_model_products.description">
|
||||
<source>Description</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.image" resname="tx_a2gproducts_domain_model_products.image">
|
||||
<source>Image</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.images" resname="tx_a2gproducts_domain_model_products.images">
|
||||
<source>Images</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.net_price" resname="tx_a2gproducts_domain_model_products.net_price">
|
||||
<source>Net Price</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.gross_price" resname="tx_a2gproducts_domain_model_products.gross_price">
|
||||
<source>Gross Price</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.rel_category" resname="tx_a2gproducts_domain_model_products.rel_category">
|
||||
<source>Category</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_products.rel_filter_values" resname="tx_a2gproducts_domain_model_products.rel_filter_values">
|
||||
<source>Filter Values</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_categories" resname="tx_a2gproducts_domain_model_categories">
|
||||
<source>Categories</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_categories.title" resname="tx_a2gproducts_domain_model_categories.title">
|
||||
<source>Title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_categories.description" resname="tx_a2gproducts_domain_model_categories.description">
|
||||
<source>Description</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_categories.image" resname="tx_a2gproducts_domain_model_categories.image">
|
||||
<source>Image</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_categories.rel_filters" resname="tx_a2gproducts_domain_model_categories.rel_filters">
|
||||
<source>Filters</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filters" resname="tx_a2gproducts_domain_model_filters">
|
||||
<source>Filters</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filters.title" resname="tx_a2gproducts_domain_model_filters.title">
|
||||
<source>Title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filters.filter_type" resname="tx_a2gproducts_domain_model_filters.filter_type">
|
||||
<source>Filter Type</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filters.db_operation_max" resname="tx_a2gproducts_domain_model_filters.db_operation_max">
|
||||
<source>Db Operation Max</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filters.db_operation_min" resname="tx_a2gproducts_domain_model_filters.db_operation_min">
|
||||
<source>Db Operation Min</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filters.rel_filter_option" resname="tx_a2gproducts_domain_model_filters.rel_filter_option">
|
||||
<source>Filter Option</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filteroptions" resname="tx_a2gproducts_domain_model_filteroptions">
|
||||
<source>Filter Options</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filteroptions.title" resname="tx_a2gproducts_domain_model_filteroptions.title">
|
||||
<source>Title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filteroptions.value_min" resname="tx_a2gproducts_domain_model_filteroptions.value_min">
|
||||
<source>Value Min</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filteroptions.value_max" resname="tx_a2gproducts_domain_model_filteroptions.value_max">
|
||||
<source>Value Max</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filtervalues" resname="tx_a2gproducts_domain_model_filtervalues">
|
||||
<source>Filter Values</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filtervalues.value" resname="tx_a2gproducts_domain_model_filtervalues.value">
|
||||
<source>Value</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_filtervalues.rel_filters" resname="tx_a2gproducts_domain_model_filtervalues.rel_filters">
|
||||
<source>Filters</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_a2gproductslist.name" resname="tx_a2g_products_a2gproductslist.name">
|
||||
<source>Altogether Products - Product List</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_a2gproductslist.description" resname="tx_a2g_products_a2gproductslist.description">
|
||||
<source></source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_a2gproductsdetail.name" resname="tx_a2g_products_a2gproductsdetail.name">
|
||||
<source>Altogether Products - Product Detail</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_a2gproductsdetail.description" resname="tx_a2g_products_a2gproductsdetail.description">
|
||||
<source></source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_ingredientslist.name" resname="tx_a2g_products_ingredientslist.name">
|
||||
<source>Altogether Products - Ingredients List</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_ingredientslist.description" resname="tx_a2g_products_ingredientslist.description">
|
||||
<source></source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_ingredientsdetail.name" resname="tx_a2g_products_ingredientsdetail.name">
|
||||
<source>Altogether Products - Ingredients Detail</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2g_products_ingredientsdetail.description" resname="tx_a2g_products_ingredientsdetail.description">
|
||||
<source></source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tx_a2gproducts_domain_model_ingredients" resname="tx_a2gproducts_domain_model_ingredients">
|
||||
<source>Ingredients</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="title" resname="title">
|
||||
<source>title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="description" resname="description">
|
||||
<source>description</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="image" resname="image">
|
||||
<source>image</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_filters" resname="rel_filters">
|
||||
<source>Filters</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="value_min" resname="value_min">
|
||||
<source>min value</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="value_max" resname="value_max">
|
||||
<source>max value</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="filter_type" resname="filter_type">
|
||||
<source>filter type</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="db_operation_min" resname="db_operation_min">
|
||||
<source>operation min</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="db_operation_max" resname="db_operation_max">
|
||||
<source>operation max</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_filter_option" resname="rel_filter_option">
|
||||
<source>filter option</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="value" resname="value">
|
||||
<source>value</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="images" resname="images">
|
||||
<source>images</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_products" resname="rel_products">
|
||||
<source>products</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="product_nr" resname="product_nr">
|
||||
<source>product nr</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_category" resname="rel_category">
|
||||
<source>category</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_filter_values" resname="rel_filter_values">
|
||||
<source>filter values</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_ingredients" resname="rel_ingredients">
|
||||
<source>ingredients</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="used_ingredients" resname="used_ingredients">
|
||||
<source>used ingredients</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="related_products" resname="related_products">
|
||||
<source>products with this ingredient</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="filter_type.useFilterOptions" resname="filter_type.useFilterOptions">
|
||||
<source>just use Filter Options</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="slug" resname="slug">
|
||||
<source>slug</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="images_tab" resname="images_tab">
|
||||
<source>Images</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="seo_tab" resname="images_tab">
|
||||
<source>SEO</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="sizes_tab" resname="images_tab">
|
||||
<source>Sizes</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="product_variants_tab" resname="product_variants_tab">
|
||||
<source>Varainats</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="filters_tab" resname="filters_tab">
|
||||
<source>Filters</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="ingredients_tab" resname="ingredients_tab">
|
||||
<source>Ingredients</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_productvariants" resname="rel_productvariants">
|
||||
<source>Product-Variants</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="description_html" resname="description_html">
|
||||
<source>Description ( RTE )</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="selectabel_product_attribute_tab" resname="selectabel_product_attribute_tab">
|
||||
<source>Product Options</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="rel_selectableattribute" resname="rel_selectableattribute">
|
||||
<source>Selectable Produkt Options</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tab_icon" resname="tab_icon">
|
||||
<source>Tab Icon</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
5
Resources/Private/Layouts/Ajax.html
Executable file
5
Resources/Private/Layouts/Ajax.html
Executable file
@ -0,0 +1,5 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
|
||||
<f:render section="content" />
|
||||
|
||||
</html>
|
5
Resources/Private/Layouts/Default.html
Executable file
5
Resources/Private/Layouts/Default.html
Executable file
@ -0,0 +1,5 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<div class="altogether-products">
|
||||
<f:render section="content" />
|
||||
</div>
|
||||
</html>
|
54
Resources/Private/Partials/ContentElements/Masonry.html
Executable file
54
Resources/Private/Partials/ContentElements/Masonry.html
Executable file
@ -0,0 +1,54 @@
|
||||
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:bk2k="http://typo3.org/ns/BK2K/BootstrapPackage/ViewHelpers" xmlns:a2g="http://typo3.org/ns/A2G/AltogetherToolkit/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<f:if condition="{records}">
|
||||
<div id="masonry-ingredent-detail" class="grid mt-0 position-relative"
|
||||
data-masonry='{ "itemSelector": ".masonry-item", "columnWidth": ".grid-sizer", "percentPosition": true, "transitionDuration": "0.05s"}'>
|
||||
<f:for each="{records}" as="item" iteration="iteration">
|
||||
|
||||
<div class="grid-sizer masonry-item--width1-3"></div>
|
||||
<div class="masonry-item masonry-item--width1-3 p-1" data-itemno="{iteration.index}">
|
||||
<f:if condition="{useLightbox}">
|
||||
<f:then>
|
||||
<bk2k:link.lightbox
|
||||
image="{item.image}"
|
||||
maxHeight="{settings.lightbox.image.maxHeight}"
|
||||
maxWidth="{settings.lightbox.image.maxWidth}"
|
||||
class="{settings.lightbox.cssClass}"
|
||||
rel="{settings.lightbox.prefix}-{data.uid}"
|
||||
title="{item.images.0.properties.title}"
|
||||
caption="{item.images.0.properties.description}"
|
||||
>
|
||||
<f:render partial="Masonry/Item/{item.data.item_type -> bk2k:format.upperCamelCase()}" arguments="{_all}" />
|
||||
</bk2k:link.lightbox>
|
||||
</f:then>
|
||||
<f:else> <f:if condition="{item.image}">
|
||||
|
||||
<f:switch expression="{item.itemClass}">
|
||||
<f:case value="">
|
||||
<f:variable name="imageWidth">300</f:variable>
|
||||
</f:case>
|
||||
<f:case value="--width2">
|
||||
<f:variable name="imageWidth">350</f:variable>
|
||||
</f:case>
|
||||
<f:case value="--width3">
|
||||
<f:variable name="imageWidth">650</f:variable>
|
||||
</f:case>
|
||||
<f:case value="--width4">
|
||||
<f:variable name="imageWidth">970</f:variable>
|
||||
</f:case>
|
||||
<f:case value="--width5">
|
||||
<f:variable name="imageWidth">1280</f:variable>
|
||||
</f:case>
|
||||
<f:defaultCase>
|
||||
<f:variable name="imageWidth">{item.image.data.width}</f:variable>
|
||||
</f:defaultCase>
|
||||
</f:switch>
|
||||
<img loading="lazy" width="100%" src="{f:uri.image(image: item.image, cropVariant: 'default', width: imageWidth)}" title="a2g-{item.image.properties.title}" alt="a2g-{item.image.properties.alternative}">
|
||||
|
||||
</f:if></f:else>
|
||||
</f:if>
|
||||
</div>
|
||||
</f:for>
|
||||
</div>
|
||||
</f:if>
|
||||
</html>
|
2
Resources/Private/Partials/Default/AjaxList.html
Executable file
2
Resources/Private/Partials/Default/AjaxList.html
Executable file
@ -0,0 +1,2 @@
|
||||
|
||||
<f:render partial="{settings.style}/Products/List/List" arguments="{_all}" />
|
12
Resources/Private/Partials/Default/List.html
Executable file
12
Resources/Private/Partials/Default/List.html
Executable file
@ -0,0 +1,12 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<div class='row'>
|
||||
<div class='col-md-4 col-lg-3'>
|
||||
<f:render partial="{settings.style}/Products/List/Filter" arguments="{uniqid: uniqid, filters: filters}" />
|
||||
</div>
|
||||
<div class='col-md-8 col-lg-9'>
|
||||
<div class="row h-100 a2g-ajax-content">
|
||||
<f:render partial="{settings.style}/Products/List/List" arguments="{products: products, settings: settings}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
34
Resources/Private/Partials/Default/Products/List/Filter.html
Executable file
34
Resources/Private/Partials/Default/Products/List/Filter.html
Executable file
@ -0,0 +1,34 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<f:form class='a2g-ajax-form' action='ajaxList' pageType='1629140329'>
|
||||
<input type='hidden' name='tx_a2gproducts_a2gproductlist[sc]' value='{settings.showCategories}'/>
|
||||
<input type='hidden' name='tx_a2gproducts_a2gproductlist[dp]' value='{settings.detailPage}'/>
|
||||
<input type='hidden' name='tx_a2gproducts_a2gproductlist[style]' value='{settings.style}'/>
|
||||
<input type='hidden' name='tx_a2gproducts_a2gproductlist[limit]' value='{settings.ajaxListLimit}'/>
|
||||
<input class='a2g-ajax-loads' type='hidden' name='tx_a2gproducts_a2gproductlist[loads]' value='0'/>
|
||||
|
||||
<input type='input' name='tx_a2gproducts_a2gproductlist[searchField]' value='{searchField}' class="form-control form-control-lg" placeholder="{f:translate(key:'LLL:EXT:a2g_products/Resources/Private/Language/locallang.xlf:product_list.search_input_placeholder',default:'LLL:EXT:a2g_products/Resources/Private/Language/locallang.xlf:product_list.search_input_placeholder')}"/>
|
||||
|
||||
<f:if condition="{filters -> f:count()} > 0">
|
||||
|
||||
<button class="btn btn-light form-control-lg mt-2 mb-2 me-2" type="button" data-bs-toggle="collapse" data-bs-target="#collapseFilter{uniqid}" aria-expanded="false" aria-controls="collapseExample">
|
||||
{f:translate(key:'LLL:EXT:a2g_products/Resources/Private/Language/locallang.xlf:product_list.advanced_search',default:'LLL:EXT:a2g_products/Resources/Private/Language/locallang.xlf:product_list.advanced_search')}
|
||||
</button>
|
||||
|
||||
|
||||
<div class="collapse" id="collapseFilter{uniqid}">
|
||||
<div class="d-flex flex-wrap">
|
||||
<f:for each="{filters}" as="filter">
|
||||
<f:if condition="{filter.relFilterOption -> f:count()} > 0">
|
||||
<div class="m-2 card card-body">
|
||||
<f:render partial="FilterElements/Checkbox" arguments="{uniqid: uniqid, filter: filter}" />
|
||||
</div>
|
||||
</f:if>
|
||||
</f:for>
|
||||
</div>
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
<f:form.submit value="{f:translate(key:'LLL:EXT:a2g_products/Resources/Private/Language/locallang.xlf:product_list.search',default:'LLL:EXT:a2g_products/Resources/Private/Language/locallang.xlf:product_list.search')}" class="btn btn-secondary form-control-lg" />
|
||||
|
||||
</f:form>
|
||||
</html>
|
24
Resources/Private/Partials/Default/Products/List/List.html
Executable file
24
Resources/Private/Partials/Default/Products/List/List.html
Executable file
@ -0,0 +1,24 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
|
||||
<f:if condition="{products -> f:count()} > 0">
|
||||
<f:then>
|
||||
<f:for each="{products}" as="product" iteration='it'>
|
||||
<f:if condition='{it.index} < {settings.ajaxListLimit} || {settings.ajaxListLimit} == 0'>
|
||||
<f:then>
|
||||
<div class="col-md-12 col-lg-6 col-sm-6">
|
||||
<f:render partial="ListElements/CardContent" arguments="{_all}" />
|
||||
</div>
|
||||
</f:then>
|
||||
</f:if>
|
||||
</f:for>
|
||||
<f:if condition='{products -> f:count()} > {settings.ajaxListLimit} && {settings.ajaxListLimit} > 0'>
|
||||
<f:then>
|
||||
<f:render partial="ListElements/LoadMoreButton" arguments="{_all}" />
|
||||
</f:then>
|
||||
</f:if>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:render partial="ListElements/NoProductFound" arguments="{_all}" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</html>
|
58
Resources/Private/Partials/Default/Products/Properties.html
Executable file
58
Resources/Private/Partials/Default/Products/Properties.html
Executable file
@ -0,0 +1,58 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
|
||||
<f:debug>{_all}</f:debug>
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org/",
|
||||
"@type": "Product",
|
||||
"name": <f:comment>lol</f:comment>"{products.title}",
|
||||
"description": <f:comment>lol</f:comment>"{products.description}",
|
||||
"brand": {
|
||||
"@type": "Brand",
|
||||
"name": "altogether"
|
||||
},
|
||||
"review": {
|
||||
"@type": "Review",
|
||||
"reviewRating": {
|
||||
"@type": "Rating",
|
||||
"ratingValue": "4",
|
||||
"bestRating": "5"
|
||||
},
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "Raphael Martin"
|
||||
}
|
||||
},
|
||||
"aggregateRating": {
|
||||
"@type": "AggregateRating",
|
||||
"ratingValue": "4.4",
|
||||
"reviewCount": "89"
|
||||
},
|
||||
"offers": {
|
||||
"@type": "Offer",
|
||||
"url": "https://example.com/anvil",
|
||||
"priceCurrency": "EUR",
|
||||
"price": "119.99",
|
||||
"priceValidUntil": "2020-11-20",
|
||||
"itemCondition": "https://schema.org/UsedCondition",
|
||||
"availability": "https://schema.org/InStock"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<h1>{product.title}</h1>
|
||||
<span><f:translate key="prduct_nr" default="prduct_nr" ></f:translate>: {product.nr}</span>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-lg-4">
|
||||
<f:if condition="{product.image}">
|
||||
<f:then>
|
||||
<f:image image="{product.image}" alt="{product.title}" title="{product.title}" width="400c" height="300" cropVariant="default" loading="lazy"></f:image>
|
||||
</f:then>
|
||||
</f:if>
|
||||
</div>
|
||||
<div class="col-lg-8">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
42
Resources/Private/Partials/Default/Show.html
Executable file
42
Resources/Private/Partials/Default/Show.html
Executable file
@ -0,0 +1,42 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
|
||||
<h1>Single View for Products</h1>
|
||||
|
||||
<f:flashMessages />
|
||||
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org/",
|
||||
"@type": "Product",
|
||||
"name": <f:comment>lol</f:comment>"{products.title}",
|
||||
"description": <f:comment>lol</f:comment>"{products.description}",
|
||||
"brand": {
|
||||
"@type": "Brand",
|
||||
"name": "altogether"
|
||||
},
|
||||
"additionalProperty": [
|
||||
{
|
||||
"@type": "https://schema.org/PropertyValue",
|
||||
"name": "wight",
|
||||
"value": "200",
|
||||
"unitText": "kg"
|
||||
}
|
||||
],
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "Raphael Martin"
|
||||
}
|
||||
},
|
||||
"offers": {
|
||||
"@type": "Offer",
|
||||
"url": "https://example.com/anvil",
|
||||
"priceCurrency": "EUR",
|
||||
"price": "119.99",
|
||||
"priceValidUntil": "2020-11-20",
|
||||
"availability": "https://schema.org/InStock"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<f:link.action action="list" pageUid="{settings.listPage}">Back to list</f:link.action>
|
||||
</html>
|
20
Resources/Private/Partials/FilterElements/Checkbox.html
Executable file
20
Resources/Private/Partials/FilterElements/Checkbox.html
Executable file
@ -0,0 +1,20 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<div class="filter{filter.uid}">
|
||||
<div class="">
|
||||
{filter.title}
|
||||
</div>
|
||||
<div class="">
|
||||
<f:for each="{filter.relFilterOption}" as="opt">
|
||||
<div class="ml-2">
|
||||
<input type="checkbox" data-name="filterOption-{uniqid}-{filter.uid}-{opt.uid}" data-group="{filter.title}" name="tx_a2gproducts_a2gproductlist[filter][{filter.uid}][{opt.uid}]" value="1" id="filterOption-{uniqid}-{filter.uid}-{opt.uid}">
|
||||
<label for="filterOption-{uniqid}-{filter.uid}-{opt.uid}">
|
||||
<f:comment>
|
||||
<span class="pill-icon"><svg id="house-entrance" xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"> <path data-name="Pfad 2136" d="M12,4.75a.5.5,0,0,0-.194-.4L6.306.1a.5.5,0,0,0-.612,0l-5.5,4.25A.5.5,0,0,0,0,4.75V11.5a.5.5,0,0,0,.5.5h4a.25.25,0,0,0,.25-.25V9.5a1.25,1.25,0,0,1,2.5,0v2.25A.25.25,0,0,0,7.5,12h4a.5.5,0,0,0,.5-.5Z" fill="#5d5d5d"></path></svg></span>
|
||||
</f:comment>
|
||||
{opt.title}
|
||||
</label>
|
||||
</div>
|
||||
</f:for>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
46
Resources/Private/Partials/FilterElements/FilterGroups.html
Executable file
46
Resources/Private/Partials/FilterElements/FilterGroups.html
Executable file
@ -0,0 +1,46 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<f:form class='a2g-ajax-form' action='ajaxList' pageType='1629140329'>
|
||||
<input type='hidden' name='tx_a2gproducts_a2gproductlist[sc]' value='{settings.showCategories}'/>
|
||||
<input type='hidden' name='tx_a2gproducts_a2gproductlist[dp]' value='{settings.detailPage}'/>
|
||||
<input type='hidden' name='tx_a2gproducts_a2gproductlist[style]' value='{settings.style}'/>
|
||||
<input type='hidden' name='tx_a2gproducts_a2gproductlist[limit]' value='{settings.ajaxListLimit}'/>
|
||||
<input class='a2g-ajax-loads' type='hidden' name='tx_a2gproducts_a2gproductlist[loads]' value='0'/>
|
||||
|
||||
<f:if condition="{filters -> f:count()} > 0">
|
||||
<f:then>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<input type='input' name='tx_a2gproducts_a2gproductlist[searchField]' value='' class="form-control mb-2 form-control-lg" placeholder="search"/>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<button class="btn btn-light form-control-lg" type="button" data-bs-toggle="collapse" data-bs-target="#collapseFilter{uniqid}" aria-expanded="false" aria-controls="collapseExample">
|
||||
advanced search
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="collapse" id="collapseFilter{uniqid}">
|
||||
<div class="d-flex flex-wrap">
|
||||
<f:for each="{filters}" as="filter">
|
||||
<f:if condition="{filter.relFilterOption -> f:count()} > 0">
|
||||
<div class="m-2 card card-body">
|
||||
<f:render partial="FilterElements/Checkbox" arguments="{uniqid: uniqid, filter: filter}" />
|
||||
</div>
|
||||
</f:if>
|
||||
</f:for>
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input type='input' name='tx_a2gproducts_a2gproductlist[searchField]' value='' class="form-control mb-2 form-control-lg" placeholder="search"/>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:form.submit value="search" class="btn btn-secondary mt-2" />
|
||||
</f:form>
|
||||
</html>
|
16
Resources/Private/Partials/FilterElements/RangeSlider.html
Executable file
16
Resources/Private/Partials/FilterElements/RangeSlider.html
Executable file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
To change this license header, choose License Headers in Project Properties.
|
||||
To change this template file, choose Tools | Templates
|
||||
and open the template in the editor.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>TODO supply a title</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div>TODO write content</div>
|
||||
</body>
|
||||
</html>
|
16
Resources/Private/Partials/FilterElements/Selectbox.html
Executable file
16
Resources/Private/Partials/FilterElements/Selectbox.html
Executable file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
To change this license header, choose License Headers in Project Properties.
|
||||
To change this template file, choose Tools | Templates
|
||||
and open the template in the editor.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>TODO supply a title</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
<div>TODO write content</div>
|
||||
</body>
|
||||
</html>
|
80
Resources/Private/Partials/Image.html
Executable file
80
Resources/Private/Partials/Image.html
Executable file
@ -0,0 +1,80 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:bk2k="http://typo3.org/ns/BK2K/BootstrapPackage/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<picture>
|
||||
<f:for each="{variants}" key="name" as="variant">
|
||||
<f:variable name="breakpoint">{variant.breakpoint as integer}</f:variable>
|
||||
<f:variable name="width">{variant.width as integer}</f:variable>
|
||||
<f:variable name="height" value="" />
|
||||
<f:if condition="{width}">
|
||||
<f:if condition="{variant.aspectRatio}">
|
||||
<f:variable name="aspectRatio">{variant.aspectRatio as float}</f:variable>
|
||||
<f:variable name="height">{width / aspectRatio}</f:variable>
|
||||
<f:variable name="height">{height as integer}</f:variable>
|
||||
</f:if>
|
||||
<f:variable name="mediaQuery">{f:if(condition: breakpoint, then: 'media="(min-width: {breakpoint}px)"')}</f:variable>
|
||||
<f:if condition="{variant.sizes}">
|
||||
<f:variable name="srcset" value="" />
|
||||
<f:for each="{variant.sizes}" key="sizeKey" as="sizeConfig" iteration="iteration">
|
||||
<f:variable name="sizeWidth">{sizeConfig.multiplier as float}</f:variable>
|
||||
<f:variable name="sizeWidth">{sizeWidth * width}</f:variable>
|
||||
<f:variable name="sizeHeight" value="" />
|
||||
<f:if condition="{height}">
|
||||
<f:then>
|
||||
<f:variable name="sizeHeight">{sizeConfig.multiplier as float}</f:variable>
|
||||
<f:variable name="sizeHeight">{sizeHeight * height}</f:variable>
|
||||
<f:variable name="sizeUrl">{f:uri.image(image: file, cropVariant: name, width: '{sizeWidth}c', height: '{sizeHeight}c',absolute:'true')}</f:variable>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:if condition="{maxWidth} < {sizeWidth}">
|
||||
<f:then>
|
||||
<f:variable name="sizeUrl">{f:uri.image(image: file, cropVariant: 'default', width: maxWidth, absolute:'true')}</f:variable>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:variable name="sizeUrl">{f:uri.image(image: file, cropVariant: 'default', width: sizeWidth, absolute:'true')}</f:variable>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:variable name="srcset">{srcset}{sizeUrl} {sizeKey}{f:if(condition: iteration.isLast, else: ',')}</f:variable>
|
||||
</f:for>
|
||||
</f:if>
|
||||
<source data-variant="{name}" {f:if(condition: sizeHeight, then: 'data-width="{width}" data-height="{sizeHeight}"', else: 'data-maxwidth="{width}"')} {mediaQuery->f:format.raw()} srcset="{srcset}">
|
||||
</f:if>
|
||||
</f:for>
|
||||
<f:variable name="defaultWidth" value="{variants.default.width}" />
|
||||
<f:variable name="defaultAspectRatio" value="{variants.default.aspectRatio}" />
|
||||
<f:if condition="{defaultAspectRatio}">
|
||||
<f:variable name="aspectRatio">{defaultAspectRatio as float}</f:variable>
|
||||
<f:variable name="defaultHeight">{defaultWidth / aspectRatio}</f:variable>
|
||||
<f:variable name="defaultHeight">{defaultHeight as integer}c</f:variable>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{defaultHeight}">
|
||||
<f:then>
|
||||
<f:variable name="src" value="{f:uri.image(image: file, cropVariant: 'default', width: defaultWidth, height: defaultHeight, absolute:'true')}" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:if condition="{maxWidth}">
|
||||
<f:then>
|
||||
<f:variable name="src" value="{f:uri.image(image: file, cropVariant: 'default', width: maxWidth, absolute:'true')}" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
|
||||
<f:variable name="src" value="{f:uri.image(image: file, cropVariant: 'default', width: defaultWidth, absolute:'true')}" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:variable name="finalWidth" value="{bk2k:data.imageInfo(src: src, property: 'width')}" />
|
||||
<f:variable name="finalHeight" value="{bk2k:data.imageInfo(src: src, property: 'height')}" />
|
||||
|
||||
<f:if condition="itemprop">
|
||||
<f:then>
|
||||
<img loading="lazy" itemprop="image" src="{src}" width="{finalWidth}" height="{finalHeight}" intrinsicsize="{finalWidth}x{finalHeight}" title="{file.properties.title}" alt="{file.properties.alternative}">
|
||||
</f:then>
|
||||
<f:else>
|
||||
<img loading="lazy" src="{src}" width="{finalWidth}" height="{finalHeight}" intrinsicsize="{finalWidth}x{finalHeight}" title="{file.properties.title}" alt="{file.properties.alternative}">
|
||||
</f:else>
|
||||
</f:if>
|
||||
</picture>
|
||||
</html>
|
42
Resources/Private/Partials/ListElements/CardContent.html
Executable file
42
Resources/Private/Partials/ListElements/CardContent.html
Executable file
@ -0,0 +1,42 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<div class="card h-100 m-2">
|
||||
<f:if condition="{product.image}">
|
||||
<f:then>
|
||||
<f:link.action action="show" controller="Products" pluginName="a2gproductsdetail" extensionName="{settings.detailPagePluginType}" pageUid="{settings.productDetailPage}" arguments="{product : product}">
|
||||
<figure class="image m-0">
|
||||
<f:render partial="Image" arguments="{file: product.image, settings: settings, variants: variants, maxWidth: 450}" />
|
||||
</figure>
|
||||
</f:link.action>
|
||||
</f:then>
|
||||
</f:if>
|
||||
<div class="card-body">
|
||||
<div class="card-title">{product.title}</div>
|
||||
<p class="card-text">
|
||||
<f:format.crop maxCharacters="150" respectWordBoundaries="true">
|
||||
{product.description}
|
||||
</f:format.crop>
|
||||
</p>
|
||||
</div>
|
||||
<ul class="list-group list-group-flush">
|
||||
<f:for each="{product.relFilterValues}" as="values">
|
||||
<li class="list-group-item">
|
||||
{values.relFilters.title} :
|
||||
<f:if condition=" {values.relFilters.filterType} == 3">
|
||||
<f:then>
|
||||
{values.relFilterOption.title}
|
||||
</f:then>
|
||||
<f:else>
|
||||
{values.value}
|
||||
</f:else>
|
||||
</f:if>
|
||||
</li>
|
||||
</f:for>
|
||||
</ul>
|
||||
<div class="card-body d-flex">
|
||||
<f:link.action class="card-link btn btn-primary" action="show" controller="Products" pluginName="a2gproductsdetail" extensionName="{settings.detailPagePluginType}" pageUid="{settings.productDetailPage}" arguments="{product : product}">
|
||||
<f:translate key="LLL:EXT:a2g_products/Resources/Private/Language/locallang.xlf:product_list.product_detail_link" default="LLL:EXT:a2g_products/Resources/Private/Language/locallang.xlf:product_list.product_detail_link"></f:translate>
|
||||
</f:link.action>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</html>
|
24
Resources/Private/Partials/ListElements/Ingredients.html
Executable file
24
Resources/Private/Partials/ListElements/Ingredients.html
Executable file
@ -0,0 +1,24 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<f:if condition="{ingredient.image}">
|
||||
<f:link.action action="show" pluginName="ingredientsdetail" absolute="true" controller="Ingredients" extensionName="A2gProducts" pageUid="{settings.ingredientsDetailPage}" arguments="{ingredient : ingredient}">
|
||||
<figure class="image card-img-top">
|
||||
<f:render partial="Image" arguments="{file: ingredient.image, settings: settings, variants: variants, maxWidth: 450}" />
|
||||
</figure>
|
||||
</f:link.action>
|
||||
</f:if>
|
||||
<div class="card-title">{ingredient.title}</div>
|
||||
<p class="card-text">
|
||||
<f:format.crop maxCharacters="150" respectWordBoundaries="true">
|
||||
{ingredient.description}
|
||||
</f:format.crop>
|
||||
</p>
|
||||
</div>
|
||||
<div class="card-footer bg-white border-white">
|
||||
<f:link.action class="card-link btn btn-primary w-100" action="show" absolute="true" pluginName="ingredientsdetail" controller="Ingredients" extensionName="A2gProducts" pageUid="{settings.ingredientsDetailPage}" arguments="{ingredient : ingredient}">
|
||||
<f:translate key="LLL:EXT:a2g_products/Resources/Private/Language/locallang.xlf:product_list.product_detail_link" default="LLL:EXT:a2g_products/Resources/Private/Language/locallang.xlf:product_list.product_detail_link"></f:translate>
|
||||
</f:link.action>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
7
Resources/Private/Partials/ListElements/LoadMoreButton.html
Executable file
7
Resources/Private/Partials/ListElements/LoadMoreButton.html
Executable file
@ -0,0 +1,7 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<div class='col-12 a2g-ajax-loadmore-btn-wrap d-flex justify-content-around'>
|
||||
<button type="button" class='a2g-ajax-loadmore-btn btn btn-secondary'>
|
||||
load more
|
||||
</button>
|
||||
</div>
|
||||
</html>
|
5
Resources/Private/Partials/ListElements/NoProductFound.html
Executable file
5
Resources/Private/Partials/ListElements/NoProductFound.html
Executable file
@ -0,0 +1,5 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<div class="col-12 d-flex justify-content-around">
|
||||
no product found
|
||||
</div>
|
||||
</html>
|
22
Resources/Private/Partials/Slider/Images.html
Executable file
22
Resources/Private/Partials/Slider/Images.html
Executable file
@ -0,0 +1,22 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<div class="swiper a2g-products-swiper-images">
|
||||
<div class="swiper-wrapper swiper-horizontal">
|
||||
<f:for each="{images}" as="image" iteration="it">
|
||||
<div class="swiper-slide">
|
||||
<img loading="lazy" src="{f:uri.image(image: image, cropVariant: 'default', width: image.data.width)}" width="100%" title="{image.title}" alt="{image.alt}">
|
||||
</div>
|
||||
</f:for>
|
||||
</div>
|
||||
<div class="swiper-button-prev"></div>
|
||||
<div class="swiper-button-next"></div>
|
||||
</div>
|
||||
<div class="swiper a2g-products-swiper-images-thumb">
|
||||
<div class="swiper-wrapper swiper-horizontal">
|
||||
<f:for each="{images}" as="image" iteration="it">
|
||||
<div class="swiper-slide">
|
||||
<img loading="lazy" src="{f:uri.image(image: image, cropVariant: 'default', width: image.data.width)}" width="100%" title="{image.title}" alt="{image.alt}">
|
||||
</div>
|
||||
</f:for>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
23
Resources/Private/Partials/Slider/Ingredients.html
Executable file
23
Resources/Private/Partials/Slider/Ingredients.html
Executable file
@ -0,0 +1,23 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:bk2k="http://typo3.org/ns/BK2K/BootstrapPackage/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<bk2k:data.imageVariants as="variants" variants="{variants}" multiplier="{columnConfig.multiplier}" gutters="{columnConfig.gutters}" corrections="{columnConfig.corrections}" />
|
||||
|
||||
<f:if condition="{ingredients -> f:count()} > 3">
|
||||
<f:then>
|
||||
<div class="swiper a2g-products-swiper-card">
|
||||
<div class="swiper-wrapper swiper-horizontal">
|
||||
<f:for each="{ingredients}" as="ingredient" iteration="it">
|
||||
<div class="swiper-slide"><div class="mb-5"><f:render partial="ListElements/Ingredients" arguments="{ingredient: ingredient, settings: settings}" /></div></div>
|
||||
</f:for>
|
||||
</div>
|
||||
<div class="swiper-pagination swiper-pagination-clickable swiper-pagination-bullets swiper-pagination-horizontal"></div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="row">
|
||||
<f:for each="{ingredients}" as="ingredient" iteration="it">
|
||||
<div class="col-lg-4 col-md-6"><f:render partial="ListElements/Ingredients" arguments="{ingredient: ingredient, settings: settings}" /></div>
|
||||
</f:for>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</html>
|
22
Resources/Private/Partials/Slider/Products.html
Executable file
22
Resources/Private/Partials/Slider/Products.html
Executable file
@ -0,0 +1,22 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
|
||||
<f:if condition="{products -> f:count()} > 3">
|
||||
<f:then>
|
||||
<div class="swiper a2g-products-swiper-card">
|
||||
<div class="swiper-wrapper swiper-horizontal a2g-product-card-group-element-columns-3">
|
||||
<f:for each="{products}" as="product" iteration="it">
|
||||
<div class="swiper-slide card-group-element-item h-100"><f:render partial="ListElements/CardContent" arguments="{product: product, settings: settings}" /></div>
|
||||
</f:for>
|
||||
</div>
|
||||
<div class="swiper-pagination swiper-pagination-clickable swiper-pagination-bullets swiper-pagination-horizontal"></div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="card-group-element card-group-element-align-center a2g-product-card-group-element-columns-3 h-100 d-flex">
|
||||
<f:for each="{products}" as="product" iteration="it">
|
||||
<div class="col-lg-4 col-md-6 card-group-element-item"><div class="mb-5"><f:render partial="ListElements/CardContent" arguments="{product: product, settings: settings}" /></div></div>
|
||||
</f:for>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</html>
|
2
Resources/Private/Partials/StyleOne/AjaxList.html
Executable file
2
Resources/Private/Partials/StyleOne/AjaxList.html
Executable file
@ -0,0 +1,2 @@
|
||||
|
||||
<f:render partial="{settings.style}/Products/List/List" arguments="{_all}" />
|
6
Resources/Private/Partials/StyleOne/List.html
Executable file
6
Resources/Private/Partials/StyleOne/List.html
Executable file
@ -0,0 +1,6 @@
|
||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||
<f:render partial="{settings.style}/Products/List/Filter" arguments="{_all}" />
|
||||
<div class="row a2g-ajax-content">
|
||||
<f:render partial="{settings.style}/Products/List/List" arguments="{_all}" />
|
||||
</div>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user