Skip to content

Commit

Permalink
[BrutBridge] Create custom feed name for each category and edition (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
VerifiedJoseph authored and logmanoriginal committed Jun 13, 2019
1 parent de53120 commit 2559dbb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bridges/BrutBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,21 @@ public function getURI() {
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') {
Expand Down

0 comments on commit 2559dbb

Please sign in to comment.