From 2559dbbf490bd72fb07672168a7ee53308cf3af1 Mon Sep 17 00:00:00 2001 From: Joseph Date: Thu, 13 Jun 2019 17:13:02 +0000 Subject: [PATCH] [BrutBridge] Create custom feed name for each category and edition (#1164) --- bridges/BrutBridge.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bridges/BrutBridge.php b/bridges/BrutBridge.php index 432cb502..32265b69 100644 --- a/bridges/BrutBridge.php +++ b/bridges/BrutBridge.php @@ -92,6 +92,21 @@ class BrutBridge extends BridgeAbstract { return parent::getURI(); } + public function getName() { + + if (!is_null($this->getInput('edition')) && !is_null($this->getInput('category'))) { + $parameters = $this->getParameters(); + + $editionValues = array_flip($parameters[0]['edition']['values']); + $categoryValues = array_flip($parameters[0]['category']['values']); + + return $categoryValues[$this->getInput('category')] . ' - ' . + $editionValues[$this->getInput('edition')] . ' - Brut.'; + } + + return parent::getName(); + } + private function processDate($description) { if ($this->getInput('edition') === 'uk') {