本文整理汇总了PHP中Wizard类的典型用法代码示例。如果您正苦于以下问题:PHP Wizard类的具体用法?PHP Wizard怎么用?PHP Wizard使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Wizard类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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}\">« {$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: auth
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* N/X is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with N/X; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
**********************************************************************/
require_once "../../config.inc.php";
$auth = new auth("EXPORT");
$page = new page("Export");
$wizard = new Wizard($lang->get("export_data", "Export Content and Templates Wizard"));
$wizard->setTitleText($lang->get("wz_export_title", "This wizard is used to exchange clusters, cluster-templates and page-templates between your N/X installation and others. The wizard generates a XML File, which you can store on your local hard drive and exchange with other N/X-Users."));
////// STEP 1 //////
$step = new Step();
$step->setTitle($lang->get("wzt_export_type", "Select type to export"));
$step->setExplanation($lang->get("wze_export_type", "On the right you need to select the type of data you want to export. Clusters are storing content. When you export clusters, the templates are automatically exported too. Cluster-Templates are schemes for creating clusters. Page-Templates are used for creating pages in the website. Cluster-Templates, Meta-Templates and layout are automatically exported when you export a Page-Template."));
$resources[0][0] = $lang->get("cluster", "Cluster");
$resources[0][1] = "CLUSTER";
$resources[1][0] = $lang->get("cluster_template", "Cluster Template");
$resources[1][1] = "CLUSTERTEMPLATE";
$resources[2][0] = $lang->get("page_template", "Page Template");
$resources[2][1] = "PAGETEMPLATE";
$step->add(new WZRadio("resource_type", $resources));
////// STEP 2 //////
$step2 = new STSelectResource();
$step2->setTitle($lang->get("wzt_sel_exp_res", "Select Resource for export"));
开发者ID:BackupTheBerlios,项目名称:nxwcms-svn,代码行数:31,代码来源:wz_export.php
示例9: tagWizard
/**
* Renders a wizard section. Each wizard section must be defined in the controller and a wizard section must
* corrospond to a method in the controller
* @param string id | id of the section
* @container
*/
protected function tagWizard($attrs)
{
$current = Pimple::instance()->getAction();
$w = Wizard::get($attrs->id);
if ($w) {
$cs = $w->getStep($current);
}
if ($cs) {
$title = '<ul class="horizontal divided">';
$before = true;
foreach ($w->getSteps() as $s) {
if ($s->getId() == $current) {
$title .= sprintf('<li class="active">%s</li>', $s->getTitle());
$before = false;
} else {
$add = '';
if ($before) {
$add = ' class="done"';
}
if ($cs->canJumpTo($s->getId())) {
$title .= sprintf('<li%s><a href="%s">%s</a></li>', $add, Url::makeLink(Pimple::instance()->getController(), $s->getId()), $s->getTitle());
} else {
$title .= sprintf('<li%s>%s</li>', $add, $s->getTitle());
}
}
}
$title .= '</ul>';
return sprintf('<div class="panel wizard %s"><h2>%s<strong>' . T('Step %s of %s', $cs->getStep(), $w->getNumSteps()) . '</strong></h2>%s</div>', $attrs->class, $title, $this->body());
} else {
return sprintf('<div class="panel">%s</div>', $this->body());
}
}
开发者ID:hofmeister,项目名称:Pimple,代码行数:38,代码来源:WidgetTagLib.php
示例10: 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)
{
// check if we have min/max values that are appropriate, etc.
if ($this->_num < $this->_min) {
$this->_num = $this->_min;
}
if ($this->_max != -1 && $this->_num > $this->_max) {
$this->_num = $this->_max;
}
$this->_ensureNumber($this->_num);
$includeAdd = !($this->_num == $this->_max);
$includeRemove = !($this->_num == $this->_min);
$m = "<table width='100%' border='0' cellspacing='0' cellpadding='2'>\n";
$this->_orderedSet->reset();
while ($this->_orderedSet->hasNext()) {
$collectionId = $this->_orderedSet->next();
$key = $collectionId->getIdString();
$this->_collections[$key]["_remove"]->setEnabled($includeRemove);
$m .= "<tr><td valign='top' style='border-bottom: 1px solid #555;'>";
$m .= $this->_collections[$key]["_remove"]->getMarkup($fieldName . "_" . $key . "__remove");
// Display the list
$m .= "\n<br/>" . $this->_collections[$key]["_moveToPosition"]->getMarkup($fieldName . "_" . $key . "__moveToPosition");
$m .= $this->_collections[$key]["_moveToPositionChoice"]->getMarkup($fieldName . "_" . $key . "__moveToPositionChoice");
$m .= "</td><td style='border-bottom: 1px solid #555;'>";
$m .= Wizard::parseText($this->_text, $this->_collections[$key], $fieldName . "_" . $key . "_");
$m .= "</td></tr>\n";
}
$this->_addButton->setEnabled($includeAdd);
$m .= "<tr><td colspan='2'>" . $this->_addButton->getMarkup($fieldName . "_add") . "</td></tr>\n";
$m .= "</table>\n";
return $m;
}
开发者ID:adamfranco,项目名称:polyphony,代码行数:40,代码来源:WOrderedRepeatableComponentCollection.class.php
示例11: 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 = "\n\t\t\t<textarea rows='" . $this->_rows . "' cols='" . $this->_cols . "'";
if (isset($this->_wrapStyle) && is_string($this->_wrapStyle)) {
$m .= " wrap='" . $this->_wrapStyle . "'";
}
$m .= "\n\t\t\t\tname='{$name}'";
$m .= "\n\t\t\t\tid='{$name}'";
$m .= !$this->isEnabled() ? " readonly='readonly'" : "";
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) . "\"";
}
if ($this->_value != null && $this->_value != $this->_startingDisplay) {
$m .= ">" . htmlspecialchars($this->_value);
} else {
if ($this->_startingDisplay) {
$v = htmlspecialchars($this->_startingDisplay, ENT_QUOTES);
$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\";}'";
$m .= " style='color: #888'>" . $v;
} else {
$m .= ">" . htmlspecialchars($this->_value);
}
}
$m .= "</textarea>";
$errText = $this->getErrorText();
$errRule = $this->getErrorRule();
$errStyle = $this->getErrorStyle();
if ($errText && $errRule) {
$m .= "<span id='" . $fieldName . "_error' style=\"padding-left: 10px; {$errStyle}\">« {$errText}</span>";
$m .= Wizard::getValidationJavascript($fieldName, $errRule, $fieldName . "_error", $this->_showError);
$this->_showError = false;
}
return $m;
}
开发者ID:adamfranco,项目名称:polyphony,代码行数:47,代码来源:WTextArea.class.php
示例12: onContinue
function onContinue($homepageUrl)
{
global $user, $prefs;
$userlib = TikiLib::lib('user');
$tikilib = TikiLib::lib('tiki');
$registrationlib = TikiLib::lib('registration');
$trklib = TikiLib::lib('trk');
// Run the parent first
parent::onContinue($homepageUrl);
//get custom fields
$customfields = $registrationlib->get_customfields();
$needs_validation_js = true;
if ($registrationlib->merged_prefs['userTracker'] == 'y') {
$chosenGroup = 'Registered';
$re = $userlib->get_group_info($chosenGroup);
if (!empty($re['usersTrackerId']) && (!empty($re['registrationUsersFieldIds']) && $prefs['feature_userWizardDifferentUsersFieldIds'] != 'y' or $prefs['feature_userWizardDifferentUsersFieldIds'] == 'y' && !empty($prefs['feature_userWizardUsersFieldIds']))) {
$needs_validation_js = false;
include_once 'lib/wiki-plugins/wikiplugin_tracker.php';
if (isset($_REQUEST['name'])) {
$user = $_REQUEST['name'];
// so that one can set user preferences at registration time
$_REQUEST['iTRACKER'] = 1;
// only one tracker plugin on registration
}
$userWizardDetailsFieldIds = '';
if ($prefs['feature_userWizardDifferentUsersFieldIds'] != 'y' or empty($prefs['feature_userWizardUsersFieldIds'])) {
$userWizardDetailsFieldIds = $re['registrationUsersFieldIds'];
} elseif ($prefs['feature_userWizardDifferentUsersFieldIds'] == 'y' and !empty($prefs['feature_userWizardUsersFieldIds'])) {
$userWizardDetailsFieldIds = $prefs['feature_userWizardUsersFieldIds'];
}
if (!is_array($userWizardDetailsFieldIds)) {
$userWizardDetailsFieldIds = explode(':', $userWizardDetailsFieldIds);
}
$userTrackerData = wikiplugin_tracker('', array('trackerId' => $re['usersTrackerId'], 'fields' => $userWizardDetailsFieldIds, 'showdesc' => 'n', 'showmandatory' => 'y', 'embedded' => 'n', 'action' => 'Save_User_Details', 'registration' => 'n', 'userField' => $re['usersFieldId']));
$tr = TikiLib::lib('trk')->get_tracker($re['usersTrackerId']);
$utid = $userlib->get_tracker_usergroup($user);
if (isset($utid['usersTrackerId'])) {
$_REQUEST['trackerId'] = $utid['usersTrackerId'];
$_REQUEST["itemId"] = $trklib->get_item_id($_REQUEST['trackerId'], $utid['usersFieldId'], $user);
}
$definition = Tracker_Definition::get($_REQUEST['trackerId']);
$xfields = array('data' => $definition->getFields());
}
}
}
开发者ID:rjsmelo,项目名称:tiki,代码行数:45,代码来源:user_tracker.php
示例13: 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)
{
$this->_currentFieldName = $fieldName;
return Wizard::parseText($this->_contentText, $this->getChildren(), $this->getFieldName());
}
开发者ID:adamfranco,项目名称:polyphony,代码行数:13,代码来源:WizardStep.class.php
示例14: 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
示例15: 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
示例16: 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
示例17: 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
示例18: 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
示例19: 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
示例20: 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
注:本文中的Wizard类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论