/**
  * Erzeugt die Controls für den Show-View. Die Controls werden entweder
  * untereinander oder gemäß dem Template-File angeordnet
  */
 protected function createControls()
 {
     $this->historie = $this->controller->historie;
     $this->setPostbackUrl(EntityLinks::update($this->historie));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Historie » anzeigen');
 }
 /**
  * Gibt den Text mit den ersetzten Links zurück
  * @return string
  */
 public function getText()
 {
     $this->text = html_entity_decode($this->text);
     $matches = [];
     // Suchen nach allem, dass in [[ ]] eingeschlossen ist
     preg_match_all('/\\[\\[([\\w\\.\\säöüÄÖÜß]+)\\]\\]/', $this->text, $matches);
     Logging::debug(print_r($matches, true));
     foreach ($matches[1] as $match) {
         $artikel = CmsArtikel::loadByBezeichnung($match, $this->kategorieId);
         if ($artikel == null) {
             Logging::info('Lege Artikel neu an: ' . $match);
             $artikel = new CmsArtikel();
             $artikel->ca_kategorie = $this->kategorieId;
             $artikel->ca_bezeichnung = $match;
             $artikel->ca_aktiv = 1;
             $artikel->ca_autor = Security::getUserId();
             $artikel->save();
             $titel = Text::get($artikel->getElementId() . '.titel');
             $titel->te_text = $match;
             $titel->save();
         }
         $link = EntityLinks::show($artikel);
         $tag = "<a href=\"{$link}\">{$match}</a>";
         $this->text = str_replace('[[' . $match . ']]', $tag, $this->text);
     }
     return $this->text;
 }
 protected function createControls()
 {
     $this->setPostbackUrl(EntityLinks::update($this->controller->import));
     $panel = new StdControls\CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Einträge &raquo; bearbeiten');
     $edit = new DataControls\EditControl($panel, 'edit');
     $edit->setEntity($this->controller->import)->addRow('im_bezeichnung')->addRow('it_bezeichnung')->addRow('im_dateiname')->addRow('*FTP')->addRow('im_ftp_host')->addRow('im_ftp_port')->addRow('im_ftp_user')->addRow('im_ftp_pass');
     $button = new StdControls\SaveButtonControl($panel, 'btnSave');
 }
 protected function createControls()
 {
     $this->setPostbackUrl(EntityLinks::update($this->controller->importtyp));
     $panel = new StdControls\CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Importtype &raquo; bearbeiten');
     $edit = new DataControls\EditControl($panel, 'edit');
     $edit->setEntity($this->controller->importtyp)->addRow('it_bezeichnung')->addRow('it_klasse');
     $button = new StdControls\SaveButtonControl($panel, 'btnSave');
 }
 /**
  * Erzeugt die Controls für den Edit-View. Die Controls werden entweder
  * untereinander oder gemäß dem Template-File angeordnet
  */
 protected function createControls()
 {
     $this->historie = $this->controller->historie;
     $this->setPostbackUrl(EntityLinks::update($this->historie));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Historie &raquo; bearbeiten');
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->historie);
     $button = new SaveButtonControl($panel, 'btnSave');
 }
 protected function createControls()
 {
     $this->setPostbackUrl(EntityLinks::update($this->controller->kategorie));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Kategorien &raquo; bearbeiten');
     $lookup = new LookupBoxControl(null, 'ck_parent');
     $lookup->setLookupEntity(new Model\CmsKategorie())->setTextfield('ck_bezeichnung')->setValuefield('ck_id')->setGroupfield('parent')->showNull(0, '-- Kein Parent --')->preSelect($this->controller->kategorie->ck_parent);
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->kategorie)->setHeader('Stammdaten bearbeiten')->addRow('ck_bezeichnung')->addRow('Parent', $lookup);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
     $texte = new TranslatedTextControl($this, 'texte');
     $texte->setCaption('Angezeiger Text');
     $texte->setElement($this->controller->kategorie->getElementId());
 }
 /**
  * Diese Methode setzt die Seitenüberschrift und die Breadcrumbs für den
  * Aufruf eines Entities
  *
  * @param BaseEntity $entity
  */
 public function handleResourceCall(BaseEntity $entity)
 {
     $this->response->getMetadata()->setHeading((string) $entity);
     Routing::resetBreadcrumbs();
     Routing::addBreadcrumb($entity->__toPluralString(), EntityLinks::index($entity));
     if ($entity->id > 0) {
         Routing::addBreadcrumb((string) $entity, EntityLinks::edit($entity));
     } else {
         Routing::addBreadcrumb('Neuen Datensatz anlegen');
     }
 }
 /**
  * Setzt die Metadaten für den Response
  *
  * @param Response $response
  */
 private function setMetadata(Response $response)
 {
     $response->getMetadata()->setHeading((string) $this->resource);
     Routing::resetBreadcrumbs();
     Routing::addBreadcrumb($this->resource->__toPluralString(), EntityLinks::index($this->resource));
     if ($this->resource->id > 0) {
         Routing::addBreadcrumb((string) $this->resource, EntityLinks::edit($this->resource));
     } else {
         Routing::addBreadcrumb('Neuen Datensatz anlegen');
     }
 }
 public function indexImportprotokoll()
 {
     $this->import = new Import($this->request->import);
     Application::getCurrentResponse()->heading = 'Protokoll für ' . $this->import;
     Routing::resetBreadcrumbs();
     Routing::addBreadcrumb('Importe', EntityLinks::index($this->import));
     Routing::addBreadcrumb($this->import);
 }