diff --git a/Modules/Application/Model/Category.php b/Modules/Application/Model/Category.php index 713e4a5..42c3cb7 100644 --- a/Modules/Application/Model/Category.php +++ b/Modules/Application/Model/Category.php @@ -4,41 +4,5 @@ namespace D3\GoogleAnalytics4\Modules\Application\Model; class Category extends Category_parent { - /** - * @param int $indexOfArray - * @return string - */ - public function getSplitCategoryArray(int $indexOfArray = -1, bool $bShallTakeStd = false) :string - { - if ($bShallTakeStd){ - $splitCatArray = - array_values( - array_filter( - explode( - '/', - trim( - parse_url( - $this->getLink(), - 5 - ) - ) - ) - ) - ); - - if (($indexOfArray >= 0) and (false === empty($splitCatArray[$indexOfArray]))){ - return $splitCatArray[$indexOfArray]; - }else{ - return ""; - } - } - - return - trim( - parse_url( - $this->getLink(), - 5 - ) - ); - } + use articleTreeStructure; } \ No newline at end of file diff --git a/Modules/Application/Model/Manufacturer.php b/Modules/Application/Model/Manufacturer.php index 1d98dda..3bf2de6 100644 --- a/Modules/Application/Model/Manufacturer.php +++ b/Modules/Application/Model/Manufacturer.php @@ -4,41 +4,5 @@ namespace D3\GoogleAnalytics4\Modules\Application\Model; class Manufacturer extends Manufacturer_parent { - /** - * @param int $indexOfArray - * @return string - */ - public function getSplitCategoryArray(int $indexOfArray = -1, bool $bShallTakeStd = false) :string - { - if ($bShallTakeStd){ - $splitCatArray = - array_values( - array_filter( - explode( - '/', - trim( - parse_url( - $this->getLink(), - 5 - ) - ) - ) - ) - ); - - if (($indexOfArray >= 0) and (false === empty($splitCatArray[$indexOfArray]))){ - return $splitCatArray[$indexOfArray]; - }else{ - return ""; - } - } - - return - trim( - parse_url( - $this->getLink(), - 5 - ) - ); - } + use articleTreeStructure; } \ No newline at end of file diff --git a/Modules/Application/Model/Vendor.php b/Modules/Application/Model/Vendor.php new file mode 100644 index 0000000..87caded --- /dev/null +++ b/Modules/Application/Model/Vendor.php @@ -0,0 +1,11 @@ +getLink(), + 5 + ) + ) + ) + ) + ); + + if (($indexOfArray >= 0) and (false === empty($splitCatArray[$indexOfArray]))){ + return $splitCatArray[$indexOfArray]; + }else{ + return ""; + } + } + + return + trim( + parse_url( + $this->getLink(), + 5 + ) + ); + } +} \ No newline at end of file