/** @return ManagedFactory */
 public function factory()
 {
     if (!$this->_factory) {
         $this->_factory = ManagedFactory::get($this->app);
     }
     return $this->_factory;
 }
 protected function _onAccessible()
 {
     $template = $this->task->vars->get('template');
     if ($template) {
         $this->setResult(ManagedFactory::get($this->app)->appTemplates()->load($template), $this->task->vars->get('contentType'), $this->task->vars->get('responseCode'));
     }
 }
 /** @return ManagedFactory */
 public function factory()
 {
     if (!$this->_factory) {
         $this->_factory = ManagedFactory::get($this->app, $this->task->module->id);
     }
     return $this->_factory;
 }
 protected function _onAccessible()
 {
     $type = $this->task->vars->get('type');
     if (!$this->factory()->module->setTypes->has($type)) {
         $this->parseError(ResponseCode::CODE_404);
         return;
     }
     $this->status = new StatusContainer();
     $this->type = $type;
     $this->id = $this->task->request->post->get('id', $this->task->vars->get('id'));
     if (!$this->_loadSet()) {
         $this->parseError(ResponseCode::CODE_404);
         return;
     }
     $q = ManagedFactory::get($this->app)->appQuick();
     if ($this->request()->post->get('delete')) {
         if ($this->set->delete()) {
             $this->deleted = true;
             if (!$this->set->status->hasSuccessMessage('success')) {
                 $this->set->postSuccess('success', $q->t('Der Inhalt wurde erfolgreich gelöscht.'));
             }
         } else {
             if (!$this->set->status->hasError('error')) {
                 $this->set->postError('error', $q->t('Der Inhalt konnte nicht gelöscht werden.'));
             }
         }
     }
     $this->submitUrl = $this->factory()->module->getRouteUrl('delete-set', array('type' => $type, 'id' => $this->set->getId()));
     $this->setResult($this->factory()->appTemplates()->load('sets/delete.html'));
 }
 protected function _submit()
 {
     $q = ManagedFactory::get($this->task->app)->appQuick();
     $this->_finishForm();
     $data = ManagedFactory::get($this->task->app)->appManagedSessionData();
     $data->login($this->_loginEvent->data['userId'], $this->_loginEvent->data['userRole']);
     $this->status->addSuccess(null, $q->t('Sie wurden erfolgreich angemeldet.'));
 }
 protected function _onAccessible()
 {
     $type = $this->task->vars->get('type');
     if (!$this->factory()->module->setTypes->has($type)) {
         $this->parseError(ResponseCode::CODE_404);
         return;
     }
     $this->type = $type;
     $this->id = $this->task->request->post->get('set_id', $this->task->vars->get('id'));
     $this->status = new StatusContainer();
     if (!$this->_loadSet()) {
         $this->parseError(ResponseCode::CODE_404);
         return;
     }
     $q = ManagedFactory::get($this->app)->appQuick();
     if ($this->request()->post->get('save')) {
         $this->set->populate($this->request()->post->data);
         $this->set->check();
         if (!$this->set->status->error) {
             if (!$this->set->status->hasSuccessMessage('success')) {
                 $this->set->postSuccess('success', $q->t('Der Inhalt wurde erfolgreich gespeichert.'));
             }
             $this->set->save();
         }
     } else {
         $this->status = new StatusContainer();
     }
     if (!$this->set->getId()) {
         $this->submitUrl = $this->factory()->module->getRouteUrl('add-set', array('type' => $type));
     } else {
         $this->submitUrl = $this->factory()->module->getRouteUrl('edit-set', array('type' => $type, 'id' => $this->set->getId()));
         $this->deleteUrl = $this->factory()->module->getRouteUrl('delete-set', array('type' => $type, 'id' => $this->set->getId()));
     }
     // >> Translate status
     if ($this->status->hasSuccessMessages) {
         foreach ($this->status->successMessages as $message) {
             if ($message) {
                 $message->message = $q->t($message->message);
             }
         }
     }
     if ($this->status->hasErrorMessages) {
         foreach ($this->status->errors as $message) {
             if ($message) {
                 $message->message = $q->t($message->message);
             }
         }
     }
     if ($this->status->hasInfoMessages) {
         foreach ($this->status->infoMessages as $message) {
             if ($message) {
                 $message->message = $q->t($message->message);
             }
         }
     }
     $this->setResult($this->factory()->appTemplates()->load('sets/edit.html'));
 }
<?php

use Grout\Cyantree\ManagedModule\ManagedFactory;
use Grout\Cyantree\ManagedModule\Pages\Sets\EditSetPage;
use Cyantree\Grout\App\Generators\Template\TemplateContext;
/** @var $this TemplateContext */
$q = ManagedFactory::get($this->app)->appQuick();
$ui = ManagedFactory::get($this->app)->appUi();
/** @var EditSetPage $page */
$page = $this->task->page;
$set = $page->set;
echo $ui->status($page->status);
echo $ui->status($set->status);
?>

<?php 
echo $ui->formStart($page->submitUrl, 'file');
?>
    <div class="item"><label></label>

        <div class="content"><h3><?php 
echo $q->e($set->config->get('title'));
?>
</h3></div>
    </div>
<?php 
$content = $set->firstContent;
do {
    if (!$content->config->get('visible')) {
        continue;
    }
<?php

/** @var $this TemplateContext */
use Grout\Cyantree\ManagedModule\ManagedFactory;
use Cyantree\Grout\App\Generators\Template\TemplateContext;
$q = ManagedFactory::get($this->app)->appQuick();
?>

<?php 
echo $q->t('Fehler 404 - Die Seite wurde nicht gefunden');
<?php

/** @var $this \Cyantree\Grout\App\Generators\Template\TemplateContext */
use Cyantree\Grout\AutoLoader;
use Grout\Cyantree\ManagedModule\ManagedFactory;
use Grout\Cyantree\ManagedModule\Forms\LoginForm;
use Cyantree\Grout\App\Generators\Template\TemplateContext;
/** @var LoginForm $f */
$f = $this->in->get('form');
$g = ManagedFactory::get($this->app);
$ui = $g->appUi();
$q = $g->appQuick();
echo $ui->status($f->status);
?>

<?php 
if ($f->status->success) {
    ?>
    <script>
        $.ct.redirect("<?php 
    echo $q->e($this->task->app->getUrl($this->task->request->url));
    ?>
", 3);
    </script>
    <?php 
} else {
    ?>
    <?php 
    echo $ui->formStart($this->task->request->url);
    ?>
    <div class="item"><label></label><div class="content"><h3><?php