示例#1
0
 public static function registerApplication()
 {
     /**
      * Register Module
      */
     Protocol::registerModule();
     Database::registerModule();
     Cache::registerModule();
     Test::registerModule();
     /**
      * Register Navigation
      */
     Main::getDisplay()->addApplicationNavigation(new Link(new Link\Route(__NAMESPACE__), new Link\Name('System'), new Link\Icon(new Cog())));
     Main::getDispatcher()->registerRoute(Main::getDispatcher()->createRoute(__NAMESPACE__, __CLASS__ . '::frontendDashboard'));
 }
示例#2
0
 /**
  * @param null       $Id
  * @param bool|false $Option
  *
  * @return bool|string
  */
 public function ShowThumbnail($Id = null, $Option = false)
 {
     if ($Id === null) {
         return false;
     }
     $Picture = Test::useService()->getTestPictureById($Id);
     $Name = $Picture->getName();
     $Auth = new Authenticator(new Get());
     $Query = http_build_query($Auth->getAuthenticator()->createSignature(array('Id' => $Id), '/Api/Test/ShowImage'));
     $Button = null;
     if ($Option) {
         $Button = new Standard('', '/Platform/System/Test/Upload/Delete/Check', new Remove(), array('Id' => $Id), 'Löschen');
     }
     return Template::getTwigTemplateString('<div class="thumbnail">
         <img class="img-responsive" src="/Api/Test/ShowImage?' . $Query . '">
         <div class="caption text-center">
         {{ Name }}
         </div>
         <div class="text-right" >
         {{ Button }}
         </div>
     </div>')->setVariable('Button', $Button)->setVariable('Name', $Name)->getContent();
 }
示例#3
0
 /**
  * @param $Id
  *
  * @return Stage
  */
 public function frontendPictureDelete($Id)
 {
     $Stage = new Stage();
     $Stage->setTitle('Bild');
     $Stage->setDescription('entfernen');
     $tblTestPicture = Test::useService()->getTestPictureById($Id);
     $Stage->setContent(Test::useService()->deleteTblTestPicture($tblTestPicture));
     return $Stage;
 }