xref: /dokuwiki/inc/Menu/Item/Subscribe.php (revision c2b9771a2c4f3934d170bc387b7fd0137cdb2c93)
193b8c351SAndreas Gohr<?php
293b8c351SAndreas Gohr
393b8c351SAndreas Gohrnamespace dokuwiki\Menu\Item;
493b8c351SAndreas Gohr
593b8c351SAndreas Gohrclass Subscribe extends AbstractItem {
693b8c351SAndreas Gohr
7*c2b9771aSAndreas Gohr    protected $svg = DOKU_INC . 'lib/images/menu/09-subscribe_email-outline.svg';
893b8c351SAndreas Gohr
993b8c351SAndreas Gohr    /** @inheritdoc */
1093b8c351SAndreas Gohr    public function __construct() {
1193b8c351SAndreas Gohr        global $INPUT;
1293b8c351SAndreas Gohr        parent::__construct();
1393b8c351SAndreas Gohr
1493b8c351SAndreas Gohr        if(!$INPUT->server->str('REMOTE_USER')) {
1593b8c351SAndreas Gohr            throw new \RuntimeException("subscribe is only for logged in users");
1693b8c351SAndreas Gohr        }
1793b8c351SAndreas Gohr    }
1893b8c351SAndreas Gohr
1993b8c351SAndreas Gohr}
20