extend Manufacturer
This commit is contained in:
bovenliggende
432ba54c84
commit
5355b0a7ad
44
Modules/Application/Model/Manufacturer.php
Normal file
44
Modules/Application/Model/Manufacturer.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace D3\GoogleAnalytics4\Modules\Application\Model;
|
||||
|
||||
class Manufacturer extends Manufacturer_parent
|
||||
{
|
||||
/**
|
||||
* @param int $indexOfArray
|
||||
* @return string
|
||||
*/
|
||||
public function getSplitCategoryArray(int $indexOfArray = -1) :string
|
||||
{
|
||||
if ($indexOfArray > -1){
|
||||
$splitCatArray =
|
||||
array_values(
|
||||
array_filter(
|
||||
explode(
|
||||
'/',
|
||||
trim(
|
||||
parse_url(
|
||||
$this->getLink(),
|
||||
5
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
if ($splitCatArray[$indexOfArray]){
|
||||
return $splitCatArray[$indexOfArray];
|
||||
}else{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
trim(
|
||||
parse_url(
|
||||
$this->getLink(),
|
||||
5
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@ use D3\GoogleAnalytics4\Modules\Application\Model\Category as Category;
|
||||
use D3\GoogleAnalytics4\Modules\Core\ViewConfig;
|
||||
use OxidEsales\Eshop\Application\Model\Basket as OEBasket;
|
||||
use OxidEsales\Eshop\Application\Model\Category as OECategory;
|
||||
use OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer;
|
||||
use OxidEsales\Eshop\Core\ViewConfig as OEViewConfig;
|
||||
|
||||
$sMetadataVersion = '2.1';
|
||||
@ -29,6 +30,7 @@ $aModule = [
|
||||
'extend' => [
|
||||
OEViewConfig::class => ViewConfig::class,
|
||||
OECategory::class => Category::class,
|
||||
OEManufacturer::class => Manufacturer::class,
|
||||
OEBasket::class => Basket::class
|
||||
],
|
||||
'templates' => [],
|
||||
|
Laden…
Verwijs in nieuw issue
Block a user