public function updateAction()
 {
     if (empty($_GET['id']) || !($language = DBFactory::get($this->module)->get($_GET['id'])) instanceof Language) {
         Header::location(UrlFactory::module($this->module));
     }
     $this->valid($language, $_POST);
     $view = $this->getView('Form');
     $view->language = $language;
     $layout = $this->getLayout('Default', $view);
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_languages'), UrlFactory::module($this->module)));
     $layout->addBreadcrumbsLink(new Link($language->name, UrlFactory::update($this->module, $language)));
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_update')));
 }
Beispiel #2
0
    protected function addUpdateButton($object, $class = '', $module = null)
    {
        $module = is_null($module) ? $this->module : $module;
        ?>
		--><a class="icon-update <?php 
        echo $class;
        ?>
" href="<?php 
        echo UrlFactory::update($module, $object);
        ?>
"></a><!--
		<?php 
        return $this;
    }
Beispiel #3
0
 public function updateAction()
 {
     if (empty($_GET['id']) || !($admin = DBFactory::get($this->module)->get($_GET['id'])) instanceof Admin) {
         $this->response->location = UrlFactory::module($this->module);
         $this->response->status = Status::$NotFound;
     }
     $this->valid($admin, $_POST);
     $view = $this->getView('Form');
     $view->admin = $admin;
     $view->languages = DBFactory::get('languages')->getEnabled();
     $layout = $this->getLayout('Default', $view);
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_admins'), UrlFactory::module($this->module)));
     $layout->addBreadcrumbsLink(new Link($admin->login, UrlFactory::update($this->module, $admin)));
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_update')));
 }
 public function updateAction()
 {
     if (empty($_GET['id']) || !($translation = DBFactory::get($this->module)->get($_GET['id'])) instanceof Translation) {
         Header::location(UrlFactory::module($this->module));
     }
     $this->valid($translation, $_POST);
     if (!empty($_POST)) {
         $this->generate();
     }
     $view = $this->getView('Form');
     $view->translation = $translation;
     $view->languages = DBFactory::get('languages')->getEnabled();
     $layout = $this->getLayout('Default', $view);
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_translations'), UrlFactory::module($this->module)));
     $layout->addBreadcrumbsLink(new Link($translation->variable, UrlFactory::update($this->module, $translation)));
     $layout->addBreadcrumbsLink(new Link(Translator::get('module_update')));
 }