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


PHP HTMLForm::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($descriptor, $context = null, $messagePrefix = '')
 {
     parent::__construct($descriptor, $context, $messagePrefix);
     $this->getOutput()->enableOOUI();
     $this->getOutput()->addModules('mediawiki.htmlform.ooui');
     $this->getOutput()->addModuleStyles('mediawiki.htmlform.ooui.styles');
 }
开发者ID:GoProjectOwner,项目名称:mediawiki,代码行数:7,代码来源:OOUIHTMLForm.php

示例2: foreach

 function __construct($formID, $fields, $title = null)
 {
     parent::__construct($formID, $fields, $title);
     foreach ($this->fields as $field) {
         $this->setType($field, "checkbox");
     }
 }
开发者ID:nemiah,项目名称:poolPi,代码行数:7,代码来源:HTMLFormCheckList.class.php

示例3: __construct

 public function __construct(IContextSource $context, $collections_message, $collection_title = '')
 {
     $this->collections_message = empty($collections_message) ? $collections_message : $collections_message . "<br>";
     $this->collection_title = $collection_title;
     $descriptor = $this->getSourceSection();
     parent::__construct($descriptor, $context, 'upload');
 }
开发者ID:akvankorlaar,项目名称:manuscriptdesk,代码行数:7,代码来源:NewManuscriptUploadForm.php

示例4: __construct

 public function __construct($url = null, $header = null, $method = null, $id = null)
 {
     parent::__construct($url, $method, $id);
     $this->set_header($header);
     $this->add_class(self::$_DEFAULT_CLASS);
     $this->set_callback(self::$_DEFAULT_CALLBACK);
     $this->set_cancel_action(self::$_DEFAULT_CANCEL_ACTION);
 }
开发者ID:zentefi,项目名称:zentefi-laravel,代码行数:8,代码来源:HTMLDialogForm.php

示例5: __construct

 public function __construct(array $options = array(), IContextSource $context = null)
 {
     if ($context instanceof IContextSource) {
         $this->setContext($context);
     }
     $this->mWatch = !empty($options['watch']);
     $this->mForReUpload = !empty($options['forreupload']);
     $this->mSessionKey = isset($options['sessionkey']) ? $options['sessionkey'] : '';
     $this->mHideIgnoreWarning = !empty($options['hideignorewarning']);
     $this->mDestWarningAck = !empty($options['destwarningack']);
     $this->mDestFile = isset($options['destfile']) ? $options['destfile'] : '';
     $this->mComment = isset($options['description']) ? $options['description'] : '';
     $this->mTextTop = isset($options['texttop']) ? $options['texttop'] : '';
     $this->mTextAfterSummary = isset($options['textaftersummary']) ? $options['textaftersummary'] : '';
     $sourceDescriptor = $this->getSourceSection();
     $descriptor = $sourceDescriptor + $this->getDescriptionSection() + $this->getOptionsSection();
     Hooks::run('UploadFormInitDescriptor', array(&$descriptor));
     parent::__construct($descriptor, $context, 'upload');
     # Add a link to edit MediaWik:Licenses
     if ($this->getUser()->isAllowed('editinterface')) {
         $licensesLink = Linker::linkKnown($this->msg('licenses')->inContentLanguage()->getTitle(), $this->msg('licenses-edit')->escaped(), array(), array('action' => 'edit'));
         $editLicenses = '<p class="mw-upload-editlicenses">' . $licensesLink . '</p>';
         $this->addFooterText($editLicenses, 'description');
     }
     # Set some form properties
     $this->setSubmitText($this->msg('uploadbtn')->text());
     $this->setSubmitName('wpUpload');
     # Used message keys: 'accesskey-upload', 'tooltip-upload'
     $this->setSubmitTooltip('upload');
     $this->setId('mw-upload-form');
     # Build a list of IDs for javascript insertion
     $this->mSourceIds = array();
     foreach ($sourceDescriptor as $field) {
         if (!empty($field['id'])) {
             $this->mSourceIds[] = $field['id'];
         }
     }
 }
开发者ID:D66Ha,项目名称:mediawiki,代码行数:38,代码来源:SpecialUpload.php

示例6: __construct

 public function __construct(array $options = array(), IContextSource $context = null)
 {
     $this->mWatch = !empty($options['watch']);
     $this->mForReUpload = !empty($options['forreupload']);
     $this->mSessionKey = isset($options['sessionkey']) ? $options['sessionkey'] : '';
     $this->mHideIgnoreWarning = !empty($options['hideignorewarning']);
     $this->mDestWarningAck = !empty($options['destwarningack']);
     $this->mDestFile = isset($options['destfile']) ? $options['destfile'] : '';
     $this->mComment = isset($options['description']) ? $options['description'] : '';
     $this->mTextTop = isset($options['texttop']) ? $options['texttop'] : '';
     $this->mTextAfterSummary = isset($options['textaftersummary']) ? $options['textaftersummary'] : '';
     $sourceDescriptor = $this->getSourceSection();
     $descriptor = $sourceDescriptor + $this->getDescriptionSection() + $this->getOptionsSection();
     wfRunHooks('UploadFormInitDescriptor', array(&$descriptor));
     parent::__construct($descriptor, $context, 'upload');
     # Set some form properties
     $this->setSubmitText($this->msg('uploadbtn')->text());
     $this->setSubmitName('wpUpload');
     # Used message keys: 'accesskey-upload', 'tooltip-upload'
     $this->setSubmitTooltip('upload');
     $this->setId('mw-upload-form');
     # Build a list of IDs for javascript insertion
     $this->mSourceIds = array();
     foreach ($sourceDescriptor as $field) {
         if (!empty($field['id'])) {
             $this->mSourceIds[] = $field['id'];
         }
     }
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:29,代码来源:SpecialUpload.php

示例7: __construct

	public function __construct( $options = array() ) {
		$this->mWatch = !empty( $options['watch'] );
		$this->mForReUpload = !empty( $options['forreupload'] );
		$this->mSessionKey = isset( $options['sessionkey'] )
				? $options['sessionkey'] : '';
		$this->mHideIgnoreWarning = !empty( $options['hideignorewarning'] );
		$this->mDestWarningAck = !empty( $options['destwarningack'] );

		$this->mDestFile = isset( $options['destfile'] ) ? $options['destfile'] : '';

		$sourceDescriptor = $this->getSourceSection();
		$descriptor = $sourceDescriptor
			+ $this->getDescriptionSection()
			+ $this->getOptionsSection();

		HTMLForm::__construct( $descriptor, 'upload' );

		# Set some form properties
		$this->setSubmitText( wfMsg( 'uploadbtn' ) );
		$this->setSubmitName( 'wpUpload' );
		$this->setSubmitTooltip( 'upload' );
		$this->setId( 'mw-upload-form' );

		# Build a list of IDs for JavaScript insertion
		$this->mSourceIds = array();
		foreach ( $sourceDescriptor as $key => $field ) {
			if ( !empty( $field['id'] ) ) {
				$this->mSourceIds[] = $field['id'];
			}
		}
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:31,代码来源:AjaxUploadForm.php

示例8: __construct

 public function __construct($options = array())
 {
     $this->mWatch = !empty($options['watch']);
     $this->mForReUpload = !empty($options['forreupload']);
     $this->mSessionKey = isset($options['sessionkey']) ? $options['sessionkey'] : '';
     $this->mHideIgnoreWarning = !empty($options['hideignorewarning']);
     $this->mDestFile = isset($options['destfile']) ? $options['destfile'] : '';
     $this->mTextTop = isset($options['texttop']) ? $options['texttop'] : '';
     $this->mTextAfterSummary = isset($options['textaftersummary']) ? $options['textaftersummary'] : '';
     $sourceDescriptor = $this->getSourceSection();
     $descriptor = $sourceDescriptor + $this->getDescriptionSection() + $this->getOptionsSection();
     Hooks::run('UploadFormInitDescriptor', array($descriptor));
     parent::__construct($descriptor, 'upload');
     # Set some form properties
     $this->setSubmitText(wfMessage('uploadbtn')->text());
     $this->setSubmitName('wpUpload');
     $this->setSubmitTooltip('upload');
     $this->setId('mw-upload-form');
     # Build a list of IDs for javascript insertion
     $this->mSourceIds = array();
     foreach ($sourceDescriptor as $key => $field) {
         if (!empty($field['id'])) {
             $this->mSourceIds[] = $field['id'];
         }
     }
     // added for Semantic Forms
     $this->addHiddenField('sfInputID', $options['sfInputID']);
     $this->addHiddenField('sfDelimiter', $options['sfDelimiter']);
 }
开发者ID:Rikuforever,项目名称:wiki,代码行数:29,代码来源:SF_UploadWindow.php

示例9: __construct

 public function __construct($options = array(), $context = null, $messagePrefix = 'multiupload')
 {
     // basically we want to map filenames to session keys here somehow
     $this->mDestFiles = array();
     for ($i = 0; $i < MultipleUpload::getMaxUploadFiles(); $i++) {
         $this->mDestFiles[$i] = $options['destfile' . $i];
     }
     $this->mSessionKeys = array();
     foreach ($options as $k => $v) {
         if (preg_match('@^sessionkey@', $k)) {
             $this->mSessionKeys[$k] = $v;
         }
     }
     // In an ideal world, this would work:
     #parent::__construct( $options, $context, $messagePrefix );
     // But MediaWiki is MediaWiki, so of course you can't pass the third
     // parameter to UploadForm::__construct(), but instead it hardcodes it
     // to 'upload'...great. So, we have to duplicate that function here. :(
     $this->mWatch = !empty($options['watch']);
     $this->mForReUpload = !empty($options['forreupload']);
     $this->mSessionKey = isset($options['sessionkey']) ? $options['sessionkey'] : '';
     $this->mHideIgnoreWarning = !empty($options['hideignorewarning']);
     $this->mDestWarningAck = !empty($options['destwarningack']);
     $this->mDestFile = isset($options['destfile']) ? $options['destfile'] : '';
     $this->mComment = isset($options['description']) ? $options['description'] : '';
     $this->mTextTop = isset($options['texttop']) ? $options['texttop'] : '';
     $this->mTextAfterSummary = isset($options['textaftersummary']) ? $options['textaftersummary'] : '';
     $sourceDescriptor = $this->getSourceSection();
     $descriptor = $sourceDescriptor + $this->getDescriptionSection() + $this->getOptionsSection();
     wfRunHooks('UploadFormInitDescriptor', array(&$descriptor));
     $this->setMessagePrefix('multiupload');
     HTMLForm::__construct($descriptor, $context, 'multiupload');
     // here's the change
     # Set some form properties
     $this->setSubmitText(wfMsg('uploadbtn'));
     $this->setSubmitName('wpUpload');
     # Used message keys: 'accesskey-upload', 'tooltip-upload'
     $this->setSubmitTooltip('upload');
     $this->setId('mw-upload-form');
     # Build a list of IDs for javascript insertion
     $this->mSourceIds = array();
     foreach ($sourceDescriptor as $field) {
         if (!empty($field['id'])) {
             $this->mSourceIds[] = $field['id'];
         }
     }
 }
开发者ID:schwarer2006,项目名称:wikia,代码行数:47,代码来源:MultiUpload.body.php

示例10: __construct

	/**
	 * @param $wm Wikimania
	 * @param $context ContextSource
	 */
	public function  __construct( Wikimania $wm, $context = null ) {
		parent::__construct( $this->getFields( $wm, $context->getUser() ), $context, 'wikimania' );
	}
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:7,代码来源:WikimaniaRegistration.php

示例11: __construct

 public function __construct($title)
 {
     $this->title = $title;
     $descriptors = $this->getDescriptors();
     parent::__construct($descriptors, 'addresource');
 }
开发者ID:n0g,项目名称:AddResource,代码行数:6,代码来源:ResourceForms.php


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