aboutsummaryrefslogtreecommitdiff
path: root/app/Models/ReadingMode.php
diff options
context:
space:
mode:
authorGravatar Kevin Papst <kpapst@gmx.net> 2018-01-24 19:37:24 +0100
committerGravatar Kevin Papst <kpapst@gmx.net> 2018-01-24 19:37:24 +0100
commit047fa17aeb65dfb6b551bf73e610057e8d78142c (patch)
treeb57f33bdfcdfb88b51849a365fd15f4d5e5d8168 /app/Models/ReadingMode.php
parentdfc638dd9856e5507e482583c4e7339fcd2bb915 (diff)
fixed css classes for reading mode buttons #1714
Diffstat (limited to 'app/Models/ReadingMode.php')
-rw-r--r--app/Models/ReadingMode.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/app/Models/ReadingMode.php b/app/Models/ReadingMode.php
index 1e97e228a..06af1704c 100644
--- a/app/Models/ReadingMode.php
+++ b/app/Models/ReadingMode.php
@@ -8,6 +8,10 @@ class FreshRSS_ReadingMode {
/**
* @var string
*/
+ protected $id;
+ /**
+ * @var string
+ */
protected $name;
/**
* @var string
@@ -24,13 +28,14 @@ class FreshRSS_ReadingMode {
/**
* ReadingMode constructor.
- * @param string $name
+ * @param string $id
* @param string $title
* @param string[] $urlParams
* @param bool $active
*/
- public function __construct($name, $title, $urlParams, $active) {
- $this->name = $name;
+ public function __construct($id, $title, $urlParams, $active) {
+ $this->id = $id;
+ $this->name = _i($id);
$this->title = $title;
$this->urlParams = $urlParams;
$this->isActive = $active;
@@ -39,6 +44,13 @@ class FreshRSS_ReadingMode {
/**
* @return string
*/
+ public function getId() {
+ return $this->id;
+ }
+
+ /**
+ * @return string
+ */
public function getName() {
return $this->name;
}
@@ -112,19 +124,19 @@ class FreshRSS_ReadingMode {
$readingModes = array(
new FreshRSS_ReadingMode(
- _i("view-normal"),
+ "view-normal",
_t('index.menu.normal_view'),
array_merge($urlOutput, array('c' => $defaultCtrl, 'a' => 'normal')),
($isDefaultCtrl && $actualView === 'normal')
),
new FreshRSS_ReadingMode(
- _i("view-global"),
+ "view-global",
_t('index.menu.global_view'),
array_merge($urlOutput, array('c' => $defaultCtrl, 'a' => 'global')),
($isDefaultCtrl && $actualView === 'global')
),
new FreshRSS_ReadingMode(
- _i("view-reader"),
+ "view-reader",
_t('index.menu.reader_view'),
array_merge($urlOutput, array('c' => $defaultCtrl, 'a' => 'reader')),
($isDefaultCtrl && $actualView === 'reader')