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


PHP Gdn_Controller::addSideMenu方法代码示例

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


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

示例1: settingsController_vanillicon_create

 /**
  * The settings page for vanillicon.
  *
  * @param Gdn_Controller $sender
  */
 public function settingsController_vanillicon_create($sender)
 {
     $sender->permission('Garden.Settings.Manage');
     $cf = new ConfigurationModule($sender);
     $items = array('v1' => 'Vanillicon 1', 'v2' => 'Vanillicon 2 (beta)');
     $cf->initialize(array('Plugins.Vanillicon.Type' => array('LabelCode' => 'Vanillicon Set', 'Control' => 'radiolist', 'Description' => 'Which vanillicon set do you want to use?', 'Items' => $items, 'Options' => array('list' => true, 'listclass' => 'icon-list', 'display' => 'after'), 'Default' => 'v1')));
     $sender->addSideMenu();
     $sender->setData('Title', sprintf(t('%s Settings'), 'Vanillicon'));
     $cf->renderAll();
 }
开发者ID:caidongyun,项目名称:vanilla,代码行数:15,代码来源:class.vanillicon.plugin.php

示例2: controller_edit

 /**
  * Edit a Tag
  *
  * @param Gdn_Controller $Sender
  */
 public function controller_edit($Sender)
 {
     $Sender->addSideMenu('settings/tagging');
     $Sender->title(t('Edit Tag'));
     $TagID = val(1, $Sender->RequestArgs);
     // Set the model on the form.
     $TagModel = new TagModel();
     $Sender->Form->setModel($TagModel);
     $Tag = $TagModel->getID($TagID);
     $Sender->Form->setData($Tag);
     // Make sure the form knows which item we are editing.
     $Sender->Form->addHidden('TagID', $TagID);
     if ($Sender->Form->authenticatedPostBack()) {
         // Make sure the tag is valid
         $TagData = $Sender->Form->getFormValue('Name');
         if (!TagModel::validateTag($TagData)) {
             $Sender->Form->addError('@' . t('ValidateTag', 'Tags cannot contain commas.'));
         }
         // Make sure that the tag name is not already in use.
         if ($TagModel->getWhere(array('TagID <>' => $TagID, 'Name' => $TagData))->numRows() > 0) {
             $Sender->setData('MergeTagVisible', true);
             if (!$Sender->Form->getFormValue('MergeTag')) {
                 $Sender->Form->addError('The specified tag name is already in use.');
             }
         }
         if ($Sender->Form->Save()) {
             $Sender->informMessage(t('Your changes have been saved.'));
         }
     }
     $Sender->render('addedit', '', 'plugins/Tagging');
 }
开发者ID:caidongyun,项目名称:vanilla,代码行数:36,代码来源:class.tagging.plugin.php

示例3: settingsController_vanillicon_create

 /**
  * The settings page for vanillicon.
  *
  * @param Gdn_Controller $sender
  */
 public function settingsController_vanillicon_create($sender)
 {
     $sender->permission('Garden.Settings.Manage');
     $cf = new ConfigurationModule($sender);
     $items = array('v1' => 'Vanillicon 1', 'v2' => 'Vanillicon 2 (beta)');
     $cachePath = self::getCachePath();
     $writable = is_writable($cachePath);
     $txtNotWritable = '<p style="color: #c00;">' . T('<b>Warning:</b> the cache directory is not writable. If you want to use the cache mechanism, you have to enable write permissions for') . '</p><code>' . $cachePath . '</code><br><br><br>';
     $txtProxyActive = '<p style="color: #090;">' . T('<b>Congratulations: The privacy of your users is respected!</b> All requests to vanillicon.com are made by your server and not by your users.') . '</p><br>';
     $cf->initialize(array('Plugins.Vanillicon.Type' => array('LabelCode' => 'Vanillicon Proxy', 'Control' => 'radiolist', 'Description' => $txtProxyActive . ($writable ? '' : $txtNotWritable) . ' ' . T('Which vanillicon set do you want to use?'), 'Items' => $items, 'Options' => array('list' => true, 'listclass' => 'icon-list', 'display' => 'after'), 'Default' => 'v1')));
     $sender->addSideMenu();
     $sender->setData('Title', sprintf(t('%s Settings'), 'Vanillicon'));
     $cf->renderAll();
 }
开发者ID:korelstar,项目名称:vanilla-proxyvanillicon,代码行数:19,代码来源:class.proxyvanillicon.plugin.php


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