當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Gdn::slice方法代碼示例

本文整理匯總了PHP中Gdn::slice方法的典型用法代碼示例。如果您正苦於以下問題:PHP Gdn::slice方法的具體用法?PHP Gdn::slice怎麽用?PHP Gdn::slice使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Gdn的用法示例。


在下文中一共展示了Gdn::slice方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: val

</h1>
<?php 
$CurrentStep = val('CurrentStep', $this->Data, 0);
$Complete = FALSE;
if ($CurrentStep < 1) {
    // The import hasn't started yet.
    echo '<div class="Info">', t('Garden.Import.Info', 'You\'re almost ready to start the import.
Please review the information below and click <b>Start Import</b> to begin the import.'), '</div>';
} else {
    $Steps = val('Steps', $this->Data, array());
    if (count($Steps) > 0 && !array_key_exists($CurrentStep, $Steps)) {
        // The import is complete.
        $Complete = TRUE;
        // The import is complete.
        echo '<div class="Info">', t('Garden.Import.Complete.Description', 'You have successfully completed an import.
   Click <b>Finished</b> when you are ready.'), '</div>';
        echo Gdn::slice('/dashboard/role/defaultroleswarning');
    } else {
        // The import is in process.
        echo '<div class="Info">', t('Garden.Import.Continue.Description', 'It appears as though you are in the middle of an import.
   Please choose one of the following options.'), '</div>';
    }
}
include $this->fetchViewLocation('stats', 'import', 'dashboard');
if ($CurrentStep < 1) {
    echo anchor(t('Start Import'), 'dashboard/import/go/' . urlencode(Gdn::session()->transientKey()), 'Button'), ' ', anchor(t('Restart'), 'dashboard/import/restart/' . urlencode(Gdn::session()->transientKey()), 'Button');
} elseif (!$Complete) {
    echo anchor(t('Continue Import'), 'dashboard/import/go/' . urlencode(Gdn::session()->transientKey()), 'Button'), ' ', anchor(t('Restart'), 'dashboard/import/restart/' . urlencode(Gdn::session()->transientKey()), 'Button');
} else {
    echo anchor(t('Finished'), 'dashboard/import/restart/' . urlencode(Gdn::session()->transientKey()), 'Button');
}
開發者ID:caidongyun,項目名稱:vanilla,代碼行數:31,代碼來源:info.php

示例2: configure

 /**
  * Configure authentication method.
  *
  * @since 2.0.3
  * @access public
  *
  * @param string $AuthenticationSchemeAlias
  */
 public function configure($AuthenticationSchemeAlias = null)
 {
     $Message = t("Please choose an authenticator to configure.");
     if (!is_null($AuthenticationSchemeAlias)) {
         $AuthenticatorInfo = Gdn::authenticator()->getAuthenticatorInfo($AuthenticationSchemeAlias);
         if ($AuthenticatorInfo !== false) {
             $this->AuthenticatorChoice = $AuthenticationSchemeAlias;
             if (array_key_exists($AuthenticationSchemeAlias, $this->ConfigureList) && $this->ConfigureList[$AuthenticationSchemeAlias] !== false) {
                 echo Gdn::slice($this->ConfigureList[$AuthenticationSchemeAlias]);
                 return;
             } else {
                 $Message = sprintf(t("The %s Authenticator does not have any custom configuration options."), $AuthenticatorInfo['Name']);
             }
         }
     }
     $this->setData('ConfigureMessage', $Message);
     $this->render();
 }
開發者ID:caidongyun,項目名稱:vanilla,代碼行數:26,代碼來源:class.authenticationcontroller.php


注:本文中的Gdn::slice方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。