xref: /dokuwiki/inc/Menu/Item/Subscribe.php (revision 93b8c351fad5246a7a91c86418f15bec833dc99f)
1*93b8c351SAndreas Gohr<?php
2*93b8c351SAndreas Gohr
3*93b8c351SAndreas Gohrnamespace dokuwiki\Menu\Item;
4*93b8c351SAndreas Gohr
5*93b8c351SAndreas Gohrclass Subscribe extends AbstractItem {
6*93b8c351SAndreas Gohr
7*93b8c351SAndreas Gohr    protected $svg = DOKU_BASE . 'lib/images/menu/09-subscribe_email-outline.svg';
8*93b8c351SAndreas Gohr
9*93b8c351SAndreas Gohr    /** @inheritdoc */
10*93b8c351SAndreas Gohr    public function __construct() {
11*93b8c351SAndreas Gohr        global $INPUT;
12*93b8c351SAndreas Gohr        parent::__construct();
13*93b8c351SAndreas Gohr
14*93b8c351SAndreas Gohr        if(!$INPUT->server->str('REMOTE_USER')) {
15*93b8c351SAndreas Gohr            throw new \RuntimeException("subscribe is only for logged in users");
16*93b8c351SAndreas Gohr        }
17*93b8c351SAndreas Gohr    }
18*93b8c351SAndreas Gohr
19*93b8c351SAndreas Gohr}
20