[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Menu/Item/ -> MediaManager.php (source)

   1  <?php
   2  
   3  namespace dokuwiki\Menu\Item;
   4  
   5  /**
   6   * Class MediaManager
   7   *
   8   * Opens the current image in the media manager. Used on image detail view.
   9   */
  10  class MediaManager extends AbstractItem
  11  {
  12      /** @inheritdoc */
  13      public function __construct()
  14      {
  15          global $IMG;
  16          parent::__construct();
  17  
  18          $imgNS = getNS($IMG);
  19          $authNS = auth_quickaclcheck("$imgNS:*");
  20          if ($authNS < AUTH_UPLOAD) {
  21              throw new \RuntimeException("media manager link only with upload permissions");
  22          }
  23  
  24          $this->svg = DOKU_INC . 'lib/images/menu/11-mediamanager_folder-image.svg';
  25          $this->type = 'mediaManager';
  26          $this->params = ['ns' => $imgNS, 'image' => $IMG, 'do' => 'media'];
  27      }
  28  }