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


PHP Wizard类代码示例

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


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

示例1: getMarkup

 /**
  * Returns a block of XHTML-valid code that contains markup for this specific
  * component. 
  * @param string $fieldName The field name to use when outputting form data or
  * similar parameters/information.
  * @access public
  * @return string
  */
 function getMarkup($fieldName)
 {
     $name = RequestContext::name($fieldName);
     $m = "<input type='text' \n\t\t\t\tname='{$name}' \n\t\t\t\tid='{$fieldName}' \n\t\t\t\tsize='" . $this->_size . "' maxlength='" . $this->_maxlength . "'" . (!$this->isEnabled() ? " readonly='readonly'" : "");
     if ($this->_value != null && $this->_value != $this->_startingDisplay) {
         $m .= " value='" . htmlspecialchars($this->_value, ENT_QUOTES) . "'";
     } else {
         if ($this->_startingDisplay) {
             $v = htmlspecialchars($this->_startingDisplay, ENT_QUOTES);
             $m .= "\n\t\t\t\tvalue='{$v}' style='color: #888' ";
             $m .= "\n\t\t\t\tonfocus='if (this.value == \"{$v}\") { this.value=\"\";  this.style.color=\"#000\";}'";
             $m .= "\n\t\t\t\tonblur='if (this.value == \"\") { this.value=\"{$v}\"; this.style.color=\"#888\";}'";
         }
     }
     if ($this->_style) {
         $m .= "\n\t\t\t\tstyle=\"" . str_replace("\"", "\\\"", $this->_style) . "\"";
     }
     if ($this->_onchange) {
         $m .= "\n\t\t\t\tonchange=\"" . str_replace("\"", "\\\"", $this->_onchange) . "\"";
     }
     $m .= " />";
     $errText = $this->getErrorText();
     $errRule = $this->getErrorRule();
     $errStyle = $this->getErrorStyle();
     if ($errText && $errRule) {
         $m .= "\n\t\t<span id='" . $fieldName . "_error' style=\"padding-left: 10px; {$errStyle}\">&laquo; {$errText}</span>";
         $m .= Wizard::getValidationJavascript($fieldName, $errRule, $fieldName . "_error", $this->_showError);
         $this->_showError = false;
     }
     return $m;
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:39,代码来源:WTextField.class.php

示例2: getMarkup

 /**
  * Returns a block of XHTML-valid code that contains markup for this specific
  * component. 
  * @param string $fieldName The field name to use when outputting form data or
  * similar parameters/information.
  * @access public
  * @return string
  */
 function getMarkup($fieldName)
 {
     if ($this->_callBack != "") {
         $code = '$this->_contentText = ' . $this->_callBack . '($this);';
         eval($code);
     }
     return Wizard::parseText($this->_contentText, $this->getChildren(), $fieldName . "_");
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:16,代码来源:WDynamicStep.class.php

示例3: __construct

	/**
	 * Constructor
	 * @param Configuration $configuration an instance of Configuration
	 * @param ILDAPWrapper $ldap an instance of ILDAPWrapper
	 */
	public function __construct(Configuration $configuration, ILDAPWrapper $ldap) {
		parent::__construct($ldap);
		$this->configuration = $configuration;
		if(is_null(Wizard::$l)) {
			Wizard::$l = \OC_L10N::get('user_ldap');
		}
		$this->result = new WizardResult;
	}
开发者ID:ArcherSys,项目名称:ArcherSysOSCloud7,代码行数:13,代码来源:wizard.php

示例4: __construct

 /**
  * Constructor
  * @param Configuration $configuration an instance of Configuration
  * @param ILDAPWrapper $ldap an instance of ILDAPWrapper
  */
 public function __construct(Configuration $configuration, ILDAPWrapper $ldap, Access $access)
 {
     parent::__construct($ldap);
     $this->configuration = $configuration;
     if (is_null(Wizard::$l)) {
         Wizard::$l = \OC::$server->getL10N('user_ldap');
     }
     $this->access = $access;
     $this->result = new WizardResult();
 }
开发者ID:adolfo2103,项目名称:hcloudfilem,代码行数:15,代码来源:wizard.php

示例5: wizardEntityMenu

 /**
  * change menu items for Wizard entities
  *
  * @param \ElggMenuItem[] $returnvalue current menu items
  * @param \Wizard         $entity      wizard entity
  *
  * @return \ElggMenuItem[]
  */
 protected static function wizardEntityMenu($returnvalue, \Wizard $entity)
 {
     $allowed_menu_items = ['access', 'edit', 'delete'];
     foreach ($returnvalue as $index => $menu_item) {
         $menu_name = $menu_item->getName();
         if (!in_array($menu_name, $allowed_menu_items)) {
             unset($returnvalue[$index]);
             continue;
         }
         if ($menu_name === 'edit') {
             $menu_item->setHref('admin/administer_utilities/wizard/manage?guid=' . $entity->guid);
         }
     }
     if (!$entity->canEdit()) {
         return $returnvalue;
     }
     $returnvalue[] = \ElggMenuItem::factory(['name' => 'copy', 'text' => elgg_echo('wizard:copy'), 'href' => "action/wizard/copy?guid={$entity->getGUID()}", 'is_action' => true, 'priority' => 100]);
     $returnvalue[] = \ElggMenuItem::factory(['name' => 'reset', 'text' => elgg_echo('reset'), 'href' => "action/wizard/reset?guid={$entity->getGUID()}", 'confirm' => elgg_echo('wizard:reset:confirm'), 'priority' => 100]);
     $returnvalue[] = \ElggMenuItem::factory(['name' => 'manage_steps', 'text' => elgg_echo('admin:administer_utilities:wizard:manage_steps'), 'href' => "admin/administer_utilities/wizard/manage_steps?guid={$entity->getGUID()}", 'priority' => 150]);
     return $returnvalue;
 }
开发者ID:coldtrick,项目名称:wizard,代码行数:29,代码来源:Menus.php

示例6: getMarkup

 /**
  * Returns a block of XHTML-valid code that contains markup for this specific
  * component. 
  * @param string $fieldName The field name to use when outputting form data or
  * similar parameters/information.
  * @access public
  * @return string
  */
 function getMarkup($fieldName)
 {
     $fromParent = parent::getMarkup($fieldName);
     // make sure that we add the form info to the markup
     $harmoni = Harmoni::instance();
     $urlObj = $harmoni->request->mkURL();
     $url = $urlObj->write();
     $formName = $this->getWizardFormName();
     $pre = "<form action='{$url}' method='post' name='{$formName}' id='{$formName}' enctype='multipart/form-data'>\n";
     $post = "\n</form>\n";
     // The removal of this confirmation on submission was added to
     // Wizard.abstract.php
     if (isset($this->confirmLeaving) && $this->confirmLeaving) {
         if (isset($this->confirmLeavingMessage) && $this->confirmLeavingMessage) {
             $string = $this->confirmLeavingMessage;
         } else {
             $string = dgettext("polyphony", "You in a wizard. Any unsubmitted changes will be lost.");
         }
         $post .= "\n<script type='text/javascript'>\n// <![CDATA[ \n\t\t\n\t\twindow.addUnloadConfirmationForElement(\"{$formName}\", \"{$string}\");\n\t\t\n\t\t// Override our parent's implementation to remove unload confirmation.\n\t\tfunction submitWizard(form) {\n\t\t\twindow.removeUnloadConfirmationForElement(form.id);\n\n\t\t\tif (validateWizard(form)) \n\t\t\t\tform.submit();\n\t\t}\n\t\n// ]]>\n</script>\n";
     }
     // ignore the field name
     return $fromParent . $pre . Wizard::parseText($this->_text, $this->getChildren(), $this->getIdString() . "_") . $post;
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:31,代码来源:SimpleWizard.class.php

示例7: getCurrentPostHtml

 /**
  * Answer the XHTML postfix markup for the current editor
  * 
  * @param string $fieldName The name we are rendering this instance with.
  * @return string
  * @access public
  * @since 1/14/08
  */
 public function getCurrentPostHtml($fieldName)
 {
     try {
         $currentEditorName = $this->editorChoice->getAllValues();
         if (!$currentEditorName) {
             throw new Exception("No current editor set.");
         }
         if (isset($this->postfixes[$currentEditorName])) {
             return Wizard::parseFieldNameText($this->postfixes[$currentEditorName], $fieldName);
         } else {
             return '';
         }
     } catch (Exception $e) {
         throw $e;
     }
 }
开发者ID:adamfranco,项目名称:polyphony,代码行数:24,代码来源:HtmlTextArea.class.php

示例8: subscribe_users

 /**
  * Subscribes the provided user ID's
  * Returns the updates progress
  */
 protected function subscribe_users()
 {
     // make sure `user_ids` is an array
     $user_ids = $_REQUEST['user_ids'];
     if (!is_array($user_ids)) {
         $user_ids = sanitize_text_field($user_ids);
         $user_ids = explode(',', $user_ids);
     }
     $result = $this->wizard->subscribe_users($user_ids);
     if ($result) {
         $this->respond(array('success' => true));
     }
     // send response
     $this->respond(array('success' => $result, 'error' => $this->wizard->get_error()));
 }
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:19,代码来源:AjaxListener.php

示例9: onContinue

 function onContinue($homepageUrl)
 {
     $tikilib = TikiLib::lib('tiki');
     // Run the parent first
     parent::onContinue($homepageUrl);
     $editorType = $_REQUEST['editorType'];
     switch ($editorType) {
         case 'wiki':
             // Wysiwyg in wiki mode is always optional (or?).
             //	The setting is presented under HTML mode, and the user can change it there.
             //	Unaware that it affects the wiki mode also, where it is safe to switch between wysiwyg and text mode.
             $tikilib->set_preference('wysiwyg_optional', 'y');
             $tikilib->set_preference('wysiwyg_htmltowiki', 'y');
             // Use wiki syntax
             break;
         case 'html':
             // Always use Wysiwyg mode as default
             //	The setting is presented under WIKI mode, and the user can change it there.
             //	Unaware that it affects the HTML mode also, where Wysiwyg always should be the default.
             $tikilib->set_preference('wysiwyg_default', 'y');
             $tikilib->set_preference('wysiwyg_htmltowiki', 'n');
             // No not use wiki syntax
             break;
     }
 }
开发者ID:linuxwhy,项目名称:tiki-1,代码行数:25,代码来源:admin_wysiwyg.php

示例10: onContinue

 public function onContinue($homepageUrl)
 {
     global $tikilib;
     // Run the parent first
     parent::onContinue($homepageUrl);
     // Configure detail preferences in own page
 }
开发者ID:jkimdon,项目名称:cohomeals,代码行数:7,代码来源:admin_advanced.php

示例11: findAll

 public function findAll(\Gacela\Criteria $criteria = null)
 {
     if (is_null($criteria)) {
         $criteria = new \Gacela\Criteria();
     }
     $criteria->equals('role', 'teacher');
     return parent::findAll($criteria);
 }
开发者ID:energylab,项目名称:gacela,代码行数:8,代码来源:Teacher.php

示例12: onContinue

 function onContinue($homepageUrl)
 {
     // Run the parent first
     $changes = parent::onContinue($homepageUrl);
     if (array_key_exists('style', $changes) || array_key_exists('style_option', $changes)) {
         $query = array('url' => $_REQUEST['url'], 'wizard_step' => $_REQUEST['wizard_step'], 'showOnLogin' => $_REQUEST['showOnLogin']);
         TikiLib::lib('access')->redirect($_SERVER['PHP_SELF'] . '?' . http_build_query($query, '', '&'));
     }
 }
开发者ID:jkimdon,项目名称:cohomeals,代码行数:9,代码来源:admin_look_and_feel.php

示例13: onContinue

 function onContinue($homepageUrl)
 {
     global $tikilib, $prefs;
     // Run the parent first
     parent::onContinue($homepageUrl);
     // If ElFinder is selected, set additional preferences
     if ($prefs['fgal_elfinder_feature'] === 'y') {
         // jQuery UI
         $tikilib->set_preference('feature_jquery_ui', 'y');
     }
 }
开发者ID:jkimdon,项目名称:cohomeals,代码行数:11,代码来源:admin_files.php

示例14: onContinue

 function onContinue($homepageUrl)
 {
     global $tikilib;
     // Run the parent first
     parent::onContinue($homepageUrl);
     if (isset($_REQUEST['useElFinderAsDefault']) && $_REQUEST['useElFinderAsDefault'] === 'on') {
         // Set ElFinder view as the default File Gallery view
         $tikilib->set_preference('fgal_default_view', 'finder');
     } else {
         // Re-set back default File Gallery view to list
         $tikilib->set_preference('fgal_default_view', 'list');
     }
 }
开发者ID:jkimdon,项目名称:cohomeals,代码行数:13,代码来源:admin_files_storage.php

示例15: onContinue

 function onContinue($homepageUrl)
 {
     $tikilib = TikiLib::lib('tiki');
     // Run the parent first
     parent::onContinue($homepageUrl);
     $editorType = $_REQUEST['editorType'];
     switch ($editorType) {
         case 'text':
             $tikilib->set_preference('feature_wysiwyg', 'n');
             break;
         case 'wysiwyg':
             $tikilib->set_preference('feature_wysiwyg', 'y');
             break;
     }
 }
开发者ID:rjsmelo,项目名称:tiki,代码行数:15,代码来源:admin_editor_type.php


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