当前位置: 首页>>代码示例>>PHP>>正文


PHP Template::getView方法代码示例

本文整理汇总了PHP中Template::getView方法的典型用法代码示例。如果您正苦于以下问题:PHP Template::getView方法的具体用法?PHP Template::getView怎么用?PHP Template::getView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Template的用法示例。


在下文中一共展示了Template::getView方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getFluxRss

function getFluxRss()
{
    global $bdd;
    global $_TABLES;
    $ajax = new Ajax();
    $flux = "";
    $flux_items = "";
    $view_rss = new Template(dirname(dirname(__FILE__)) . '/html/rss.html');
    $view_item = new Template(dirname(dirname(__FILE__)) . '/html/rss-item.html');
    if (!is_null($bdd) && !is_null($_TABLES)) {
        $objRss = new Rss($bdd, $_TABLES);
        $items = $objRss->getAll();
        if (!is_null($items)) {
            foreach ($items as $key => $value) {
                $flux_items .= $view_item->getView(array("guid" => 'http://' . $_SERVER['HTTP_HOST'] . '/to/' . $value->guid . '#' . $value->url, "title" => $value->title, "url" => 'http://' . $_SERVER['HTTP_HOST'] . '/to/' . $value->guid . '#' . $value->url, "description" => $value->description, "date_publication" => date("D, d M Y H:i:s", strtotime($value->date_publication)) . ' +0200'));
            }
            $flux = $view_rss->getView(array("flux_rss" => 'http://' . $_SERVER['HTTP_HOST'] . $ajax->env->flux_rss, "title_site" => $ajax->env->title_site, "url_site" => 'http://' . $_SERVER['HTTP_HOST'], "description_site" => $ajax->env->description_site, "items" => $flux_items, "date_publication_site" => date("D, d M Y H:i:s", strtotime("now")) . ' +0200'));
            $fp = fopen(dirname(dirname(dirname(dirname(__FILE__)))) . "/rss.xml", 'w+');
            fputs($fp, html_entity_decode(htmlspecialchars_decode($flux)));
            fclose($fp);
            return file_get_contents(dirname(dirname(dirname(dirname(__FILE__)))) . "/rss.xml");
        } else {
            // 404
            return "404 Not Found";
        }
    } else {
        error_log("BDD ERROR : " . json_encode($bdd));
        error_log("TABLES ERROR : " . json_encode($_TABLES));
    }
}
开发者ID:xXNoceboXx,项目名称:WUS,代码行数:30,代码来源:controller.rss.php

示例2: getContent

 public function getContent()
 {
     $out = '';
     $User = $this->doorGets->user;
     $lgActuel = $this->doorGets->getLangueTradution();
     $moduleInfos = $this->doorGets->moduleInfos($this->doorGets->Uri, $lgActuel);
     // Check if is content modo
     $is_modo = in_array($moduleInfos['id'], $User['liste_module_modo']) ? true : false;
     // Check if is module modo
     in_array('module', $User['liste_module_interne']) && in_array('module_' . $moduleInfos['type'], $User['liste_module_interne']) ? $is_modules_modo = true : ($is_modules_modo = false);
     // check if user can edit content
     $user_can_add = in_array($moduleInfos['id'], $User['liste_module_add']) ? true : false;
     // check if user can edit content
     $user_can_edit = in_array($moduleInfos['id'], $User['liste_module_edit']) ? true : false;
     // check if user can delete content
     $user_can_delete = in_array($moduleInfos['id'], $User['liste_module_delete']) ? true : false;
     $Rubriques = array('index' => $this->doorGets->__('Index'));
     // get Content for edit
     $params = $this->doorGets->Params();
     if (array_key_exists('uri', $params['GET'])) {
         $uri = $params['GET']['uri'];
         $isContent = $this->doorGets->dbQS($uri, $this->doorGets->Table, 'uri_module', "AND langue = '" . $lgActuel . "' LIMIT 1 ");
     }
     $ActionFile = 'modules/' . $this->doorGets->controllerNameNow() . '/user_' . $this->doorGets->controllerNameNow() . '_' . $this->Action;
     $tpl = Template::getView($ActionFile);
     ob_start();
     if (is_file($tpl)) {
         include $tpl;
     }
     $out .= ob_get_clean();
     return $out;
 }
开发者ID:doorgets,项目名称:cms,代码行数:32,代码来源:modulelinkView.php

示例3: getContent

 public function getContent()
 {
     $out = '';
     $me = $this->doorGets->user;
     // get Content for edit / delete
     $params = $this->doorGets->Params();
     if (array_key_exists('id', $params['GET'])) {
         $id = $params['GET']['id'];
         $isContent = $this->doorGets->dbQS($id, '_discountcode');
         if (!empty($isContent)) {
             // $isCheckedDefault = ($isContent['is_default'] === '1') ? 'checked': '';
         }
     }
     switch ($this->Action) {
         case 'index':
             $DiscountcodeQuery = new DiscountcodeQuery($this->doorGets);
             $DiscountcodeQuery->find();
             $Discountcodes = $DiscountcodeQuery->_getEntities('array');
             break;
         case 'add':
             break;
         case 'edit':
             break;
         case 'delete':
             break;
     }
     $ActionFile = 'user/discountcode/user_discountcode_' . $this->Action;
     $tpl = Template::getView($ActionFile);
     ob_start();
     if (is_file($tpl)) {
         include $tpl;
     }
     $out .= ob_get_clean();
     return $out;
 }
开发者ID:doorgets,项目名称:cms,代码行数:35,代码来源:discountcodeView.php

示例4: lastArticle

function lastArticle()
{
    global $bdd;
    global $_TABLES;
    $content = "";
    $view = new Template(dirname(dirname(__FILE__)) . '/html/article.html');
    if (!is_null($bdd) && !is_null($_TABLES)) {
        $objLastArticle = new LastArticle($bdd, $_TABLES);
        $articles = $objLastArticle->getLastArticles();
        if (!is_null($articles)) {
            foreach ($articles as $key => $value) {
                $temp_subscription = '';
                if (isset($_SESSION['user_auth']) && $_SESSION['user_auth'] == '1' && isset($_SESSION['user_subscription'])) {
                    if (in_array($value->website_id, $_SESSION['user_subscription'])) {
                        $temp_subscription = "<div class='unsubscription' website_id='%%website_id%%'></div>";
                    } else {
                        $temp_subscription = "<div class='subscription' website_id='%%website_id%%'></div>";
                    }
                }
                $content .= $view->getView(array("url" => '/to/' . $value->guid . '#' . $value->url, "title" => $value->title, "width_image" => $value->width_image, "height_image" => $value->height_image, "image" => $value->image, "alt_image" => $value->alt_image, "description" => $value->description, "logo_site" => $value->logo, "alt_logo_site" => $value->website, "title_site" => $value->website, "subscription" => $temp_subscription, "website_id" => $value->website_id));
            }
            return $content;
        } else {
            // 404
            return "404 Not Found";
        }
    } else {
        error_log("BDD ERROR : " . json_encode($bdd));
        error_log("TABLES ERROR : " . json_encode($_TABLES));
    }
}
开发者ID:xXNoceboXx,项目名称:WUS,代码行数:31,代码来源:controller.last_article.php

示例5: getContent

 public function getContent()
 {
     $out = '';
     $lgActuel = $this->doorGets->getLangueTradution();
     $moduleInfos = $this->doorGets->moduleInfos($this->doorGets->Uri, $lgActuel);
     $listeCategories = $this->doorGets->categorieSimple;
     unset($listeCategories[0]);
     $aActivation = $this->doorGets->getArrayForms('activation');
     $Rubriques = array('index' => $this->doorGets->__('Index'), 'add' => $this->doorGets->__('Ajouter'), 'edit' => $this->doorGets->__('Modifier'), 'delete' => $this->doorGets->__('Supprimer'));
     // get Content for edit / delete
     $params = $this->doorGets->Params();
     if (array_key_exists('uri', $params['GET'])) {
         $uri = $params['GET']['uri'];
         $isContent = $this->doorGets->dbQS($uri, $this->doorGets->Table, 'uri');
         if (!empty($isContent)) {
             if ($lgGroupe = @unserialize($isContent['groupe_traduction'])) {
                 $idLgGroupe = $lgGroupe[$lgActuel];
                 $isContentTraduction = $this->doorGets->dbQS($idLgGroupe, $this->doorGets->Table . '_traduction');
                 if (!empty($isContentTraduction)) {
                     $isContent = array_merge($isContent, $isContentTraduction);
                     $this->isContent = $isContent;
                 }
             }
         }
     }
     $ActionFile = 'modules/' . $this->doorGets->controllerNameNow() . '/user_' . $this->doorGets->controllerNameNow() . '_' . $this->Action;
     $tpl = Template::getView($ActionFile);
     ob_start();
     if (is_file($tpl)) {
         include $tpl;
     }
     $out .= ob_get_clean();
     return $out;
 }
开发者ID:doorgets,项目名称:cms,代码行数:34,代码来源:moduleblockView.php

示例6: subscriptionList

function subscriptionList()
{
    global $bdd;
    global $_TABLES;
    $content = "";
    $view = new Template(dirname(dirname(__FILE__)) . '/html/media.html');
    if (!is_null($bdd) && !is_null($_TABLES)) {
        if (isset($_SESSION['user_id'])) {
            $user_id = $_SESSION['user_id'];
            $objWebsiteSubscription = new WebsiteSubscription($bdd, $_TABLES);
            $website_subscriptions = $objWebsiteSubscription->getAllWebsiteSubscriptionsByUser($user_id);
            if (!is_null($website_subscriptions)) {
                $objWebsite = new Website($bdd, $_TABLES);
                foreach ($website_subscriptions as $key => $value) {
                    $website = $objWebsite->getData($value->website_id);
                    if (!is_null($website)) {
                        $temp_subscription = "<div class='unsubscription' website_id='%%website_id%%'></div>";
                        $content .= $view->getView(array("url" => $website->url, "title" => $website->website, "logo_site" => $website->logo, "alt_logo_site" => $website->website, "title_site" => $website->website, "subscription" => $temp_subscription, "website_id" => $website->id));
                    }
                }
                return $content;
            } else {
                // 404
                return "404 Not Found";
            }
        } else {
            // 404
            return "404 Not Found";
        }
    } else {
        error_log("BDD ERROR : " . json_encode($bdd));
        error_log("TABLES ERROR : " . json_encode($_TABLES));
    }
}
开发者ID:xXNoceboXx,项目名称:WUS,代码行数:34,代码来源:controller.subscription.php

示例7: initContent

 public function initContent()
 {
     $doorgets = $this->doorgets;
     $ActionFile = $this->doorgets->getStep();
     $tpl = Template::getView($ActionFile);
     ob_start();
     if (is_file($tpl)) {
         include $tpl;
     }
     $out = ob_get_clean();
     $this->content = $out;
 }
开发者ID:vinothtimes,项目名称:doorgets,代码行数:12,代码来源:doorgetsView.php

示例8: getContent

 public function getContent()
 {
     $out = '';
     $nameController = $this->doorGets->controllerNameNow();
     $params = $this->doorGets->Params();
     $Rubriques = array('index' => $this->doorGets->__('Index de la page'), 'add' => $this->doorGets->__('Ajouter'), 'edit' => $this->doorGets->__('Modifier'), 'delete' => $this->doorGets->__('Supprimer'));
     $isAllTheme = $this->doorGets->getAllThemesName();
     $nameTheme = $this->doorGets->configWeb['theme'];
     $countTheme = count($isAllTheme);
     if (array_key_exists($this->Action, $Rubriques)) {
         switch ($this->Action) {
             case 'index':
                 break;
             case 'add':
                 $allTheme = array();
                 if (!empty($isAllTheme)) {
                     foreach ($isAllTheme as $v) {
                         $allTheme[$v] = $v;
                     }
                 }
                 break;
             case 'edit':
                 $theme = $params['GET']['name'];
                 $fileSelected = $theme . '/css/doorgets.css';
                 if (array_key_exists('file', $params['GET'])) {
                     $fileSelected = $params['GET']['file'];
                 }
                 $themeListe = $this->doorGets->listThemeFiles($theme);
                 $fileContent = '';
                 if (array_key_exists($fileSelected, $themeListe['js'])) {
                     $fileContent = file_get_contents(THEME . $fileSelected);
                 } elseif (array_key_exists($fileSelected, $themeListe['css'])) {
                     $fileContent = file_get_contents(THEME . $fileSelected);
                 } elseif (array_key_exists($fileSelected, $themeListe['tpl'])) {
                     $fileContent = file_get_contents(THEME . $fileSelected);
                 }
                 break;
             case 'delete':
                 $theme = $params['GET']['name'];
                 break;
         }
         $ActionFile = 'user/' . $nameController . '/user_' . $nameController . '_' . $this->Action;
         $tpl = Template::getView($ActionFile);
         ob_start();
         if (is_file($tpl)) {
             include $tpl;
         }
         $out .= ob_get_clean();
     }
     return $out;
 }
开发者ID:neoartdoo,项目名称:CMS,代码行数:51,代码来源:themeView.php

示例9: getContent

 public function getContent()
 {
     $out = '';
     $tplAccountRubrique = Template::getView('user/account/user_account_rubrique');
     ob_start();
     if (is_file($tplAccountRubrique)) {
         include $tplAccountRubrique;
     }
     $htmlAccountRubrique = ob_get_clean();
     switch ($this->Action) {
         case 'index':
             $postFinish = false;
             $amount = 5000;
             $currency = 'eur';
             $orderId = '6735';
             $isUser = $this->doorGets->dbQS($this->user['id'], '_user_stripe', 'id_user');
             StripeService::init($this->doorGets);
             if (array_key_exists('stripeToken', $_POST)) {
                 $token = $_POST['stripeToken'];
                 $isUser = $this->doorGets->dbQS($this->user['id'], '_user_stripe', 'id_user');
                 if (empty($isUser)) {
                     $customer = \Stripe\Customer::create(array('email' => $this->user['login'], 'card' => $token));
                     $dataCharge = array('customer' => $customer->id, 'amount' => $amount, 'currency' => $currency, "metadata" => array("order_id" => $orderId));
                     $dataUser = array('id_stripe' => $customer->id, 'id_user' => $this->user['id'], 'date_creation' => time(), 'date_modification' => time());
                     $this->doorGets->dbQI($dataUser, '_user_stripe');
                 } else {
                     $dataCharge = array("amount" => $amount, "currency" => $currency, "customer" => $isUser['id_stripe'], "metadata" => array("order_id" => $orderId));
                 }
                 $charge = \Stripe\Charge::create($dataCharge);
                 $dataChargeToSave = array("id_user" => $this->user['id'], "id_stripe" => $isUser['id_stripe'], "id_charge" => $charge->id, "id_order" => $orderId, "status" => $charge->status, "amount" => $charge->amount, "currency" => $charge->currency, "data" => @serialize($charge), 'date_creation' => time(), 'date_modification' => time());
                 $idNewCharge = $this->doorGets->dbQI($dataChargeToSave, '_user_stripe_charge');
                 $postFinish = true;
             }
             break;
     }
     $ActionFile = 'user/purchase/user_purchase_' . $this->Action;
     $tpl = Template::getView($ActionFile);
     ob_start();
     if (is_file($tpl)) {
         include $tpl;
     }
     $out .= ob_get_clean();
     return $out;
 }
开发者ID:neoartdoo,项目名称:CMS,代码行数:44,代码来源:purchaseView.php

示例10: getContent

 public function getContent()
 {
     $out = '';
     $Rubriques = array('index' => $this->doorGets->__('Index de la page'));
     if (array_key_exists($this->Action, $Rubriques)) {
         switch ($this->Action) {
             case 'index':
                 echo __FILE__;
                 break;
         }
         $ActionFile = 'user/' . $this->doorGets->controllerNameNow() . '/user_' . $this->doorGets->controllerNameNow() . '_' . $this->Action;
         $tpl = Template::getView($ActionFile);
         ob_start();
         if (is_file($tpl)) {
             include $tpl;
         }
         $out .= ob_get_clean();
     }
     return $out;
 }
开发者ID:doorgets,项目名称:cms,代码行数:20,代码来源:indexView.php

示例11: getContent

 public function getContent()
 {
     $out = '';
     $User = $this->doorGets->user;
     $lgActuel = $this->doorGets->getLangueTradution();
     $isVersionActive = false;
     $version_id = 0;
     // Check if is content modo
     in_array('traduction', $User['liste_module_interne']) ? $is_modo = true : ($is_modo = false);
     // Check if is module modo
     in_array('traduction', $User['liste_module_interne']) && in_array('traduction_modo', $User['liste_module_interne']) ? $is_modules_modo = true : ($is_modules_modo = false);
     $Rubriques = array('index' => $this->doorGets->__('Traductions'));
     $fileTempTraductions = LANGUE . 'temp.lg.php';
     if (!is_file($fileTempTraductions)) {
         return $fileTempTraductions . ' not found.';
     }
     include $fileTempTraductions;
     $cFields = count($wTranslate);
     $_toLanguage = $this->doorGets->getLangueTradutionForTraduction();
     $allLanguages = $this->doorGets->getAllLanguages();
     $fileToTraductions = LANGUE . $_toLanguage . '.lg.php';
     include $fileToTraductions;
     $cFieldsTo = count($_w);
     if (array_key_exists($this->Action, $Rubriques)) {
         switch ($this->Action) {
             case 'index':
                 // to do
                 break;
         }
         $ActionFile = 'user/traductions/user_traductions_' . $this->Action;
         $tpl = Template::getView($ActionFile);
         ob_start();
         if (is_file($tpl)) {
             include $tpl;
         }
         $out .= ob_get_clean();
     }
     return $out;
 }
开发者ID:neoartdoo,项目名称:CMS,代码行数:39,代码来源:traductionsView.php

示例12: getContent

 public function getContent()
 {
     $out = '';
     $me = $this->doorGets->user;
     // get Content for edit / delete
     $params = $this->doorGets->Params();
     if (array_key_exists('id', $params['GET'])) {
         $id = $params['GET']['id'];
         $isContent = $this->doorGets->dbQS($id, '_users_address');
         if (!empty($isContent)) {
             $isCheckedDefault = $isContent['is_default'] === '1' ? 'checked' : '';
             $isCheckedIsBilling = $isContent['is_billing'] === '1' ? 'checked' : '';
             $isCheckedIsShipping = $isContent['is_shipping'] === '1' ? 'checked' : '';
         }
     }
     switch ($this->Action) {
         case 'index':
             $UsersAddressQuery = new UsersAddressQuery($this->doorGets);
             $UsersAddressQuery->filterByIdUser($me['id'])->find();
             $myAddress = $UsersAddressQuery->_getEntities('array');
             break;
         case 'add':
             break;
         case 'edit':
             break;
         case 'delete':
             break;
     }
     $ActionFile = 'user/address/user_address_' . $this->Action;
     $tpl = Template::getView($ActionFile);
     ob_start();
     if (is_file($tpl)) {
         include $tpl;
     }
     $out .= ob_get_clean();
     return $out;
 }
开发者ID:doorgets,项目名称:cms,代码行数:37,代码来源:addressView.php

示例13: getBoxFile

 public function getBoxFile($displayDelete = false, $displayBox = false, $i = 0, $lLabel = '', $lValue = '', $lActive = '', $lObli = '', $lInfo = '', $lCss = '', $tZip = '', $tPng = '', $tJpg = '', $tGif = '', $tPdf = '', $tSwf = '', $tDoc = '')
 {
     $boxFile = 'user/modules/widgets/genform/user_modules_box_file';
     $tpl = Template::getView($boxFile);
     ob_start();
     if (is_file($tpl)) {
         include $tpl;
     }
     $out = $tpl;
     $out = ob_get_clean();
     return $out;
 }
开发者ID:neoartdoo,项目名称:CMS,代码行数:12,代码来源:modulesView.php

示例14: getContent

 public function getContent()
 {
     $out = '';
     $me = $this->doorGets->user;
     // get Content for edit / delete
     $params = $this->doorGets->Params();
     if (array_key_exists('id', $params['GET'])) {
         $id = $params['GET']['id'];
         $isContent = $this->doorGets->dbQS($id, '_promotion');
         if (!empty($isContent)) {
             $isContent['categories'] = @unserialize($isContent['categories']);
             // $isCheckedDefault = ($isContent['is_default'] === '1') ? 'checked': '';
         }
     }
     $storeMenuFile = 'user/user_store_menu';
     $tplStoreMenu = Template::getView($storeMenuFile);
     ob_start();
     if (is_file($tplStoreMenu)) {
         include $tplStoreMenu;
     }
     $storeMenuHtml = ob_get_clean();
     $aActivation = $this->doorGets->getArrayForms('yn');
     $currencyCode = $this->doorGets->configWeb['currency'];
     $currencyIcon = Constant::$currencyIcon[$currencyCode];
     $aPriority = range(0, 10);
     $aPercent = range(0, 100);
     $aStockmin = range(0, 100);
     $aType = array('percent' => $this->doorGets->__("Pourcentage") . ' %', 'amount' => $this->doorGets->__("Montant") . ' ' . $currencyIcon);
     switch ($this->Action) {
         case 'index':
             $PromotionQuery = new PromotionQuery($this->doorGets);
             $PromotionQuery->orderByPriority();
             $PromotionQuery->find();
             $Promotions = $PromotionQuery->_getEntities('array');
             break;
         case 'add':
             $shopModules = $this->doorGets->loadModules(true, true, 'shop');
             $categories = array();
             if (!empty($shopModules)) {
                 foreach ($shopModules as $module) {
                     $this->doorGets->loadCategories($module['uri']);
                     $categories[$module['id']] = $this->doorGets->categorieSimple__;
                     unset($categories[$module['id']][0]);
                 }
             }
             break;
         case 'edit':
             $shopModules = $this->doorGets->loadModules(true, true, 'shop');
             $categories = array();
             if (!empty($shopModules)) {
                 foreach ($shopModules as $module) {
                     $this->doorGets->loadCategories($module['uri']);
                     $categories[$module['id']] = $this->doorGets->categorieSimple__;
                     unset($categories[$module['id']][0]);
                 }
             }
             break;
         case 'delete':
             break;
     }
     $ActionFile = 'user/promotion/user_promotion_' . $this->Action;
     $tpl = Template::getView($ActionFile);
     ob_start();
     if (is_file($tpl)) {
         include $tpl;
     }
     $out .= ob_get_clean();
     return $out;
 }
开发者ID:doorgets,项目名称:cms,代码行数:69,代码来源:promotionView.php

示例15: getContent


//.........这里部分代码省略.........
                     $block->addContent('delete', '--', 'center');
                 }
                 // end Seach
                 $valFilterDateStart = '';
                 if (array_key_exists('q_date_creation_start', $aGroupeFilter)) {
                     $valFilterDateStart = $aGroupeFilter['q_date_creation_start'];
                 }
                 $valFilterDateEnd = '';
                 if (array_key_exists('q_date_creation_end', $aGroupeFilter)) {
                     $valFilterDateEnd = $aGroupeFilter['q_date_creation_end'];
                 }
                 $sFilterDate = $this->doorGets->Form['_search_filter']->input('', 'q_date_creation_start', 'text', $valFilterDateStart, 'doorGets-date-input datepicker-from');
                 $sFilterDate .= $this->doorGets->Form['_search_filter']->input('', 'q_date_creation_end', 'text', $valFilterDateEnd, 'doorGets-date-input datepicker-to');
                 $block->addContent('date_creation', $sFilterDate, 'center');
                 if (empty($cAll)) {
                     foreach ($isFieldArraySearchType as $nameField => $value) {
                         $block->addContent($nameField, '');
                     }
                     $block->addContent('date_creation', '', 'text-center');
                     $block->addContent('edit', '', 'text-center');
                     if ($is_modules_modo) {
                         $block->addContent('delete', '', 'text-center');
                     }
                 }
                 for ($i = 0; $i < $cAll; $i++) {
                     $urlId = $all[$i]["id_content"];
                     $urlDelete = '<a title="' . $this->doorGets->__('Supprimer') . '" href="./?controller=' . $this->doorGets->controllerNameNow() . '&action=delete&id=' . $all[$i]['id_content'] . '&lg=' . $lgActuel . '"><b class="glyphicon glyphicon-remove red"></b></a>';
                     $urlEdit = '<a title="' . $this->doorGets->__('Modifier') . '" href="./?controller=' . $this->doorGets->controllerNameNow() . '&action=edit&id=' . $all[$i]['id_content'] . '&lg=' . $lgActuel . '"><b class="glyphicon glyphicon-pencil green-font"></b></a>';
                     foreach ($isFieldArray as $nameField => $value) {
                         $css = '';
                         if ($nameField === 'date_creation') {
                             $css = 'tb-30 text-center';
                             $block->addContent($nameField, GetDate::in($all[$i][$nameField], 2, $this->doorGets->myLanguage()), $css);
                         } else {
                             $all[$i][$nameField] = $this->doorGets->_truncate($all[$i][$nameField], '50');
                             $all[$i][$nameField] = $all[$i][$nameField];
                             $block->addContent($nameField, $all[$i][$nameField], $css);
                         }
                     }
                     $block->addContent('edit', $urlEdit, 'tb-30 text-center');
                     if ($is_modules_modo) {
                         $block->addContent('delete', $urlDelete, 'tb-30 text-center');
                     }
                 }
                 $formMassDelete = '';
                 $fileFormMassDelete = 'user/' . $this->doorGets->controllerNameNow() . '/user_' . $this->doorGets->controllerNameNow() . '_massdelete_form';
                 $tplFormMassDelete = Template::getView($fileFormMassDelete);
                 ob_start();
                 if (is_file($tplFormMassDelete)) {
                     include $tplFormMassDelete;
                 }
                 $formMassDelete = ob_get_clean();
                 /**********
                  *
                  *  End block creation for listing fields
                  * 
                  */
                 break;
             case 'delete':
                 $htmlCanotDelete = '';
                 $fileCanotDelete = 'modules/' . $this->doorGets->zoneArea() . '_canot_delete';
                 $tplCanotDelete = Template::getView($fileCanotDelete);
                 ob_start();
                 if (is_file($tplCanotDelete)) {
                     include $tplCanotDelete;
                 }
                 $htmlCanotDelete = ob_get_clean();
                 break;
             case 'edit':
                 $cVersion = $this->getCountVersion();
                 $versions = $this->getAllVersion();
                 $url = "?controller=translator&action=edit&id=" . $isContent['id_content'] . "&lg=" . $lgActuel;
                 $yesno = $this->doorGets->getArrayForms();
                 unset($yesno[0]);
                 $lgToTranslate = $lgActuel;
                 if ($lgToTranslate === 'tu') {
                     $lgToTranslate = 'tr';
                 }
                 if ($lgToTranslate === 'po') {
                     $lgToTranslate = 'pt';
                 }
                 if ($lgToTranslate === 'su') {
                     $lgToTranslate = 'sv';
                 }
                 if ($lgToTranslate === 'cn') {
                     $lgToTranslate = 'zh-CN';
                 }
                 $googleTranslateUrl = '<a href="https://translate.google.com/#fr/' . $lgToTranslate . '/' . urlencode($isContent['subject']) . '" target="blank">' . $isContent['subject'] . ' <b class="glyphicon glyphicon-share-alt"></b></a>';
                 break;
         }
         $ActionFile = 'user/' . $this->doorGets->controllerNameNow() . '/user_' . $this->doorGets->controllerNameNow() . '_' . $this->Action;
         $tpl = Template::getView($ActionFile);
         ob_start();
         if (is_file($tpl)) {
             include $tpl;
         }
         $out .= ob_get_clean();
     }
     return $out;
 }
开发者ID:doorgets,项目名称:cms,代码行数:101,代码来源:emailnotificationView.php


注:本文中的Template::getView方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。