Toggle navigation
Hot Examples
ZH
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
搜索
PHP TextArea, 示例
编程语言:
PHP
类/类型:
TextArea
hotexamples.com的示例:
21
PHP TextArea - 已找到21个示例
。这些是从开源项目中提取的最受好评的
TextArea
现实PHP示例。您可以评价示例,以帮助我们提高示例质量。
常用方法
显示
隐藏
__construct(3)
render(3)
setValue(3)
renderValidationJS(2)
TextArea(2)
hasErrors(2)
setCols(2)
setRows(2)
setReadOnly(1)
setLabel(1)
setName(1)
setOptionList(1)
setTextEditor(1)
setRequired(1)
setValidator(1)
setWidth(1)
useWysiwyg(1)
validate(1)
validator(1)
setHeight(1)
GetPiwiXML(1)
setExtra(1)
setAutoHeight(1)
SetText(1)
hasClassLike(1)
getType(1)
getRows(1)
getPlaceholder(1)
getHTML(1)
getField(1)
getControl(1)
getCols(1)
addValidator(1)
addChild(1)
__set(1)
Show(1)
wait_until_loaded(1)
常用方法
__construct (3)
render (3)
setValue (3)
renderValidationJS (2)
TextArea (2)
hasErrors (2)
setCols (2)
setRows (2)
setReadOnly (1)
setLabel (1)
常用方法
setName (1)
setOptionList (1)
setTextEditor (1)
setRequired (1)
setValidator (1)
setWidth (1)
useWysiwyg (1)
validate (1)
validator (1)
setHeight (1)
GetPiwiXML (1)
setExtra (1)
setAutoHeight (1)
SetText (1)
hasClassLike (1)
getType (1)
getRows (1)
getPlaceholder (1)
getHTML (1)
getField (1)
常用方法
GetPiwiXML (1)
setExtra (1)
setAutoHeight (1)
SetText (1)
hasClassLike (1)
getType (1)
getRows (1)
getPlaceholder (1)
getHTML (1)
getField (1)
getControl (1)
getCols (1)
addValidator (1)
addChild (1)
__set (1)
Show (1)
wait_until_loaded (1)
Related in langs
ButtonController (C#)
BLL_Dictionary (C#)
imx51_add_imx_uart (C++)
setResult (C++)
Fini (Go)
IComponent (Go)
Info (Java)
Dependency (Java)
set_history (Python)
fromstring (Python)
常用方法
getControl (1)
getCols (1)
addValidator (1)
addChild (1)
__set (1)
Show (1)
wait_until_loaded (1)
相关
HumanHelp_Model_Comment
LsDb
pdo_get_solr_schema
BenutzernameCheck
xsm_prepare_message
PlanResourceType
GFCache
TOOL_SYNC_STEP2
get_response_encoding
validateNodeName
For more details on how to use validation see {@link FormValidationRequirement}. Rather than use the rows and cols attributes as with a traditional HTML
, you should style your text-multiline using CSS. <div class="row doc-tags"> <div class="col-md-12"> <div class="tag-block tag-summary"> </div> <div class="tag-block tag-remarks"> </div> <div class="tag-block tag-exception"> </div> <div class="tag-block tag-see"> <div class="field"> See also: <span>FormInput </span> </div> </div> <div class="tag-block tag-link"> </div> <div class="tag-block tag-deprecated"> </div> <div class="tag-block tag-since"> </div> <div class="tag-block tag-author"> <div class="field"> Author: <span> Iain Dooley (iain@iaindooley.com) </span> </div> </div> </div> </div> <div class="doc-tags"> <div class="field"> Inheritance: <span> <span class="inheritance-type">extends</span> <span class="inheritance-name">FormInput</span> </span> </div> </div> </div> </div> <div class="row" style="margin-bottom: 15px"> <div class="col-md-12"> <a class="btn btn-default" href="https://doc.hotexamples.com/zh/class/-/TextArea"> TextArea Class Documentation </a> </div> </div> </div> <div id="ezoic-pub-ad-placeholder-106"> </div> <div class="example-item" id="0x3ffdfc3c14fa6d0e40786d449a5457be8a1e440a45f69ef9f1499733973bb4f9-74,,85,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#1</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_1" data-hash="0x3ffdfc3c14fa6d0e40786d449a5457be8a1e440a45f69ef9f1499733973bb4f9" data-area="74,,85,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '1')" class="rating-up btn btn-success" data-id="rating_1"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'1')" class="rating-down btn btn-danger" data-id="rating_1"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0x3ffdfc3c14fa6d0e40786d449a5457be8a1e440a45f69ef9f1499733973bb4f9-74,,85,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0x3ffdfc3c14fa6d0e40786d449a5457be8a1e440a45f69ef9f1499733973bb4f9&fullName=tests%2Funit%2FxoopsLib%2FXoops%2FTextAreaTest.php&project=ming-hai%2FXoopsCore')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fming-hai%2FXoopsCore%2Fblob%2Fmaster%2Ftests%2Funit%2FxoopsLib%2FXoops%2FTextAreaTest.php">TextAreaTest.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fming-hai%2FXoopsCore">ming-hai/XoopsCore</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="1"> <pre class="line-numbers language-php" data-end="85" data-start="75" data-highlight="83,84"> /** * @covers Xoops\Form\TextArea::__construct * @covers Xoops\Form\TextArea::render * @covers Xoops\Form\Element::themeDecorateElement */ public function test__construct() { $oldWay = new TextArea('mycaption', 'myname', 'myvalue'); $newWay = new TextArea(['caption' => 'mycaption', 'name' => 'myname', 'value' => 'myvalue']); $this->assertEquals($oldWay->render(), $newWay->render()); $this->assertNotFalse($oldWay->hasClassLike('span5')); }</pre> </div> </figure> </div> <div id="ezoic-pub-ad-placeholder-107"> <div style="text-align: center;margin-bottom: 10px"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- after-example-1 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="4981531786" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="example-item" id="0x1d24d992440b23f26369081625c35249e14d6e8842d61d035c33890164a2b147-41,,50,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#2</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_2" data-hash="0x1d24d992440b23f26369081625c35249e14d6e8842d61d035c33890164a2b147" data-area="41,,50,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '2')" class="rating-up btn btn-success" data-id="rating_2"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'2')" class="rating-down btn btn-danger" data-id="rating_2"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0x1d24d992440b23f26369081625c35249e14d6e8842d61d035c33890164a2b147-41,,50,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0x1d24d992440b23f26369081625c35249e14d6e8842d61d035c33890164a2b147&fullName=tests%2Funits%2Fclasses%2Fui%2FTextAreaTest.php&project=fruition-sciences%2Fphpfw')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Ffruition-sciences%2Fphpfw%2Fblob%2Fmaster%2Ftests%2Funits%2Fclasses%2Fui%2FTextAreaTest.php">TextAreaTest.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Ffruition-sciences%2Fphpfw">fruition-sciences/phpfw</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="2"> <pre class="line-numbers language-php" data-end="50" data-start="42" data-highlight="17,48"> /** * @covers TextArea::toString */ public function testToString() { $value = "June"; $text = $this->text->setValue($value); $actual = $text->toString(); $this->assertEquals($value, $actual); }</pre> </div> </figure> </div> <div id="ezoic-pub-ad-placeholder-108"> <div style="text-align: center;"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- after-example-2 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="7155150962" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="example-item" id="0x2f054d97cfaf0774f64438eca42c3f0493c639f50ebc412fcf9ecfcf1e437b38-30,,37,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#3</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_3" data-hash="0x2f054d97cfaf0774f64438eca42c3f0493c639f50ebc412fcf9ecfcf1e437b38" data-area="30,,37,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '3')" class="rating-up btn btn-success" data-id="rating_3"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'3')" class="rating-down btn btn-danger" data-id="rating_3"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0x2f054d97cfaf0774f64438eca42c3f0493c639f50ebc412fcf9ecfcf1e437b38-30,,37,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0x2f054d97cfaf0774f64438eca42c3f0493c639f50ebc412fcf9ecfcf1e437b38&fullName=examples%2Fckeditor%2Fincludes%2FEditor.php&project=PurdyForks%2Fsaunter.php')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2FPurdyForks%2Fsaunter.php%2Fblob%2Fmaster%2Fexamples%2Fckeditor%2Fincludes%2FEditor.php">Editor.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2FPurdyForks%2Fsaunter.php">PurdyForks/saunter.php</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="3"> <pre class="line-numbers language-php" data-end="37" data-start="31" data-highlight="35,36,37"> function switch_to_textarea() { $iframe = self::$session->find_element_by_locator($this->locators["iframe"]); self::$session->frame($iframe); $t = new TextArea(self::$session); $t->wait_until_loaded(); return $t; }</pre> </div> </figure> </div> <div id="ezoic-pub-ad-placeholder-109"> <div style="text-align: center;"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- after-example-3 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="8699811701" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="example-item" id="0x78afa5e714400dfc10ad6276b871a762772b92211af53947cf23f4c8c1843e11-58,,73,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#4</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_4" data-hash="0x78afa5e714400dfc10ad6276b871a762772b92211af53947cf23f4c8c1843e11" data-area="58,,73,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '4')" class="rating-up btn btn-success" data-id="rating_4"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'4')" class="rating-down btn btn-danger" data-id="rating_4"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0x78afa5e714400dfc10ad6276b871a762772b92211af53947cf23f4c8c1843e11-58,,73,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0x78afa5e714400dfc10ad6276b871a762772b92211af53947cf23f4c8c1843e11&fullName=tests%2Funit%2FxoopsLib%2FXoops%2FTextAreaTest.php&project=redmexico%2FXoopsCore')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fredmexico%2FXoopsCore%2Fblob%2Fmaster%2Ftests%2Funit%2FxoopsLib%2FXoops%2FTextAreaTest.php">TextAreaTest.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fredmexico%2FXoopsCore">redmexico/XoopsCore</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="4"> <pre class="line-numbers language-php" data-end="73" data-start="59" data-highlight="19,64"> /** * @covers Xoops\Form\TextArea::render */ public function testRender() { $value = $this->object->render(); $this->assertTrue(is_string($value)); $this->assertTrue(false !== strpos($value, '<textarea')); $this->assertTrue(false !== strpos($value, 'name="name"')); $this->assertTrue(false !== strpos($value, 'rows="5"')); $this->assertTrue(false !== strpos($value, 'cols="10"')); $this->assertTrue(false !== strpos($value, 'placeholder="placeholder"')); $this->assertTrue(false !== strpos($value, 'title="Caption"')); $this->assertTrue(false !== strpos($value, 'id="name"')); $this->assertTrue(false !== strpos($value, '>value<')); }</pre> </div> </figure> </div> <div id="ezoic-pub-ad-placeholder-110"> </div> <div class="example-item" id="0xdc0fb8e05f76e772a256a46b68d73b6cadbf218e84fd1ed4254efc5c59b3f6bc-59,,80,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#5</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_5" data-hash="0xdc0fb8e05f76e772a256a46b68d73b6cadbf218e84fd1ed4254efc5c59b3f6bc" data-area="59,,80,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '5')" class="rating-up btn btn-success" data-id="rating_5"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'5')" class="rating-down btn btn-danger" data-id="rating_5"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0xdc0fb8e05f76e772a256a46b68d73b6cadbf218e84fd1ed4254efc5c59b3f6bc-59,,80,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0xdc0fb8e05f76e772a256a46b68d73b6cadbf218e84fd1ed4254efc5c59b3f6bc&fullName=htdocs%2Fxoops_lib%2FXoops%2FEditor.php&project=redmexico%2FXoopsCore')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fredmexico%2FXoopsCore%2Fblob%2Fmaster%2Fhtdocs%2Fxoops_lib%2FXoops%2FEditor.php">Editor.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fredmexico%2FXoopsCore">redmexico/XoopsCore</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="5"> <pre class="line-numbers language-php" data-end="80" data-start="60" data-highlight="77"> /** * renderValidationJS * TEMPORARY SOLUTION to 'override' original renderValidationJS method * with custom XoopsEditor's renderValidationJS method * * @return string|false */ public function renderValidationJS() { if ($this->editor instanceof \XoopsEditor && $this->isRequired()) { if (method_exists($this->editor, 'renderValidationJS')) { $this->editor->setName($this->getName()); $this->editor->setCaption($this->getCaption()); $this->editor->setRequired($this->isRequired()); $ret = $this->editor->renderValidationJS(); return $ret; } else { parent::renderValidationJS(); } } return false; }</pre> </div> </figure> </div> <div id="ezoic-pub-ad-placeholder-111"> </div> <div class="example-item" id="0x7c8bcfc97085a7d24528c1ee6ac26ad9a0be379e7ba0abd720ebf48b5e942ee4-50,,75,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#6</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_6" data-hash="0x7c8bcfc97085a7d24528c1ee6ac26ad9a0be379e7ba0abd720ebf48b5e942ee4" data-area="50,,75,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '6')" class="rating-up btn btn-success" data-id="rating_6"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'6')" class="rating-down btn btn-danger" data-id="rating_6"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0x7c8bcfc97085a7d24528c1ee6ac26ad9a0be379e7ba0abd720ebf48b5e942ee4-50,,75,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0x7c8bcfc97085a7d24528c1ee6ac26ad9a0be379e7ba0abd720ebf48b5e942ee4&fullName=system%2Fmodules%2Ftranslation-fields%2FTranslationTextArea.php&project=craffft%2Fcontao-translation-fields')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fcraffft%2Fcontao-translation-fields%2Fblob%2Fmaster%2Fsystem%2Fmodules%2Ftranslation-fields%2FTranslationTextArea.php">TranslationTextArea.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fcraffft%2Fcontao-translation-fields">craffft/contao-translation-fields</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="6"> <pre class="line-numbers language-php" data-end="75" data-start="51" data-highlight="70"> /** * @param $varInput * @return mixed */ protected function validator($varInput) { // Get language id $intId = $this->activeRecord ? $this->activeRecord->{$this->strName} : $GLOBALS['TL_CONFIG'][$this->strName]; // Check if translation fields should not be empty saved if (!$GLOBALS['TL_CONFIG']['dontfillEmptyTranslationFields']) { // Fill all empty fields with the content of the fallback field $varInput = \TranslationFieldsWidgetHelper::addFallbackValueToEmptyField($varInput); parent::validator($varInput); } else { // Check only the first field parent::validator($varInput[key($varInput)]); } // Check if array if (is_array($varInput)) { if (!parent::hasErrors()) { // Save values and return fid return \TranslationFieldsWidgetHelper::saveValuesAndReturnFid($varInput, $intId); } } return $intId; }</pre> </div> </figure> </div> <div class="example-item" id="0xc271eb1de583235f897ea6e070bb8a8f453eb329906668733f35c3bb24eafe78-1404,,1555,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#7</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_7" data-hash="0xc271eb1de583235f897ea6e070bb8a8f453eb329906668733f35c3bb24eafe78" data-area="1404,,1555,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '7')" class="rating-up btn btn-success" data-id="rating_7"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'7')" class="rating-down btn btn-danger" data-id="rating_7"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0xc271eb1de583235f897ea6e070bb8a8f453eb329906668733f35c3bb24eafe78-1404,,1555,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0xc271eb1de583235f897ea6e070bb8a8f453eb329906668733f35c3bb24eafe78&fullName=classes%2Fobjects%2FDbTable.php&project=CyborgOne%2Fcybihomecontrol_ui')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2FCyborgOne%2Fcybihomecontrol_ui%2Fblob%2Fmaster%2Fclasses%2Fobjects%2FDbTable.php">DbTable.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2FCyborgOne%2Fcybihomecontrol_ui">CyborgOne/cybihomecontrol_ui</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="7"> <pre class="line-numbers language-php" data-end="1555" data-start="1405" data-highlight="1490,1491"> function getSingleUpdateMask($rowId) { $tblAll = new Table(array("")); if ($rowId == null || $rowId == "") { return $tblAll; } $f1 = new FontType(); $f1->setFontSize(2); $f1->setBold(true); $f2 = new FontType(); $fts = array($f1, $f2); $table = new Table(array("", "")); $table->setHeadEnabled(false); $table->setBorder(0); $table->setFontTypes($fts); $table->setAlign($this->getAlign()); $table->setVAlign($this->getVAlign()); $table->setAlignments($this->getAlignments()); if ($this->WIDTH > 0) { $table->setWidth($this->WIDTH); } if ($this->HEIGHT > 0) { $table->setHeight($this->HEIGHT); } if ($this->BORDER != null && strlen($this->BORDER) > 0) { $table->setBorder($this->BORDER); } if ($this->PADDING >= 0) { $table->setPadding($this->PADDING); } if ($this->HEAD_ENABLED) { $table->setHeadEnabled($this->HEAD_ENABLED); } if ($this->SPACING >= 0) { $table->setSpacing($this->SPACING); } if ($this->XPOS > 0 && $this->YPOS > 0) { $table->setXPos($this->XPOS); $table->setYPos($this->YPOS); } $chk = 0; $stmnt = "SELECT "; foreach ($this->COLNAMES as $cn) { if ($stmnt != "SELECT ") { $stmnt .= ", "; } $stmnt .= $cn; $chk++; } $stmnt .= ", id as rowid "; $stmnt .= " FROM " . $this->TABLENAME . " where id = " . $rowId . " " . $this->ORDERBY . " LIMIT 1 "; $result = $this->DBCONNECT->executeQuery($stmnt); $rowEdit = mysql_fetch_array($result); for ($i = 0; $i < mysql_num_fields($result) - 1; $i++) { $fieldName = mysql_field_name($result, $i); $arrChk = array_search($fieldName, $this->NOUPDATECOLS); if (strlen($arrChk) == 0) { $r = $table->createRow(); $o = ""; $lookups = getLookupWerte($_SESSION['config']->DBCONNECT, $this->TABLENAME, $fieldName); // in der Datenbank für dieses Datenbankfeld // definierte Combobox laden (wenn vorhanden) $dbCombo = getDbComboArray($this->TABLENAME, $fieldName, $rowEdit); $val = ""; if (isset($rowEdit[$fieldName]) && strlen($rowEdit[$fieldName]) > 0) { $val = $rowEdit[$fieldName]; } if (mysql_num_rows($lookups) == 0 && !$this->isDbComboSet($this->TABLENAME, $fieldName)) { /*if (strpos(" " . $this->DEFAULTS, $fieldName) > 0) { $tmpval = substr($this->DEFAULTS, strpos($this->DEFAULTS, "=") + 1); $o = new HiddenField($fieldName, $tmpval); } else*/ if (strpos(mysql_field_flags($result, $i), "enum") > 0) { $ev = $this->getEnumValues($fieldName); if (count($ev) == 2 && (in_array('J', $ev) && in_array('N', $ev))) { $o = new Checkbox($fieldName . $rowId, "", "J"); if ($rowEdit[$fieldName] == "J") { $o->setSelected(true); } } else { $o = new ComboBox($fieldName . $rowId, $this->getComboboxEnumArray($fieldName)); } } else { if (mysql_field_type($result, $i) == "blob") { $o = new TextArea($fieldName . $rowId, $val, 80, 10); $o->setTextEditor($this->TEXTEDITOR_ENABLED); } else { if (mysql_field_type($result, $i) == "date") { $o = new DateTextfield($fieldName . $rowId, $val); $o->setToolTip("Bitte im Format: <b>YYYY-MM-TT</b> angeben"); } else { if (mysql_field_type($result, $i) == "int") { $o = new TextField($fieldName . $rowId, $val); } else { if (mysql_field_type($result, $i) == "timestamp") { $o = new TextField($fieldName . $rowId, $val); } else { $o = new TextField($fieldName . $rowId, $val); } } } } } } else { if (mysql_num_rows($lookups) > 0) { $o = new LookupCombo($_SESSION['config']->DBCONNECT, $fieldName . $rowId, $this->TABLENAME, $fieldName, $rowEdit[$fieldName]); } else { if (count($dbCombo) > 0) { if (!strpos(" " . $this->DEFAULTS, $fieldName) > 0) { $o = new ComboBox($fieldName . $rowId, $dbCombo, $val); } else { $o = new HiddenField($fieldName . $rowId, $val); } } } } if ($i < count($this->LABELS)) { $r->setAttribute(0, $this->LABELS[$i]); } else { $r->setAttribute(0, ""); } $arrChk = array_search($fieldName, $this->READONLYCOLS); if (strlen($arrChk) != 0) { $o->setReadOnly(true); } $r->setAttribute(1, $o); $table->addRow($r); } } foreach ($this->ADDITIONAL_UPDATE_FIELDS as $label => $field) { $r = $table->createRow(); $r->setAttribute(0, $label); $r->setAttribute(1, $field); $table->addRow($r); } $okButton = new Button("DbTableUpdate" . $this->TABLENAME, "Speichern"); $r = $table->createRow(); $r->setSpawnAll(true); $r->setAttribute(0, $okButton); $table->addRow($r); $rowAll1 = $tblAll->createRow(); $rowAll2 = $tblAll->createRow(); $rowAll1->setAttribute(0, $table); $tblAll->addRow($rowAll1); $tblAll->addRow($rowAll2); $f = new Form($_SERVER['SCRIPT_NAME']); $f->add($tblAll); $f->add(new Hiddenfield("SingleUpdateRowId", $rowId)); $f->add($this->DEFAULT_HIDDEN_FIELDS); return $f; }</pre> </div> </figure> </div> <div class="example-item" id="0xd465198730e25f8d5efd5be5a5dfe3725ffa8170ec9acb52cf5747ad4fdf2f00-314,,364,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#8</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_8" data-hash="0xd465198730e25f8d5efd5be5a5dfe3725ffa8170ec9acb52cf5747ad4fdf2f00" data-area="314,,364,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '8')" class="rating-up btn btn-success" data-id="rating_8"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'8')" class="rating-down btn btn-danger" data-id="rating_8"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0xd465198730e25f8d5efd5be5a5dfe3725ffa8170ec9acb52cf5747ad4fdf2f00-314,,364,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0xd465198730e25f8d5efd5be5a5dfe3725ffa8170ec9acb52cf5747ad4fdf2f00&fullName=classes%2FTable.php&project=CyborgOne%2Fcybihomecontrol_ui')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2FCyborgOne%2Fcybihomecontrol_ui%2Fblob%2Fmaster%2Fclasses%2FTable.php">Table.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2FCyborgOne%2Fcybihomecontrol_ui">CyborgOne/cybihomecontrol_ui</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="8"> <pre class="line-numbers language-php" data-end="364" data-start="315" data-highlight="354,355,356,357,358"> function TableBySql($sql) { $this->NAME = "Table"; $this->XPOS = ""; $this->YPOS = ""; $this->WIDTH = "100%"; $this->HEIGHT = 0; $this->BORDER = 0; $this->setPadding(0); $this->setSpacing(0); $this->COLSIZES = array(); $this->ROWS = array(); $this->FONTTYPES = array(); $this->DESIGNJN = "N"; $this->TABLEDESIGN = "default"; $this->DESIGNWIDTH = 20; $this->DESIGNHEIGHT = 20; $this->HEAD_ENABLED = true; $this->DBCONNECT = $_SESSION['config']->DBCONNECT; $this->SQL = $sql; $result = $this->DBCONNECT->executeQuery($this->SQL); $menge = mysql_num_fields($result); // SpaltenNamen holen for ($x = 0; $x < $menge; $x++) { $cN[$x] = mysql_field_name($result, $x); } $this->COLNAMES = $cN; $this->prepareFonts(); //Select-Ergebniss in Rows *packen* while ($rowArray = @mysql_fetch_array($result)) { $newRow = $this->createRow(); if (strlen($this->getVAlign()) > 0) { $newRow->setVAlign($this->getVAlign()); } if (strlen($this->getAlign()) > 0) { $newRow->setAlign($this->getAlign()); } for ($i = 0; $i < count($this->COLNAMES); $i++) { if (mysql_field_type($result, $i) == "blob") { $txa = new TextArea("txt", $rowArray[$i]); $txa->setWidth(40); $txa->setHeight(3); $txa->setReadOnly(true); $newRow->setAttribute($i, $txa); } else { $newRow->setAttribute($i, new Text($rowArray[$i])); } } $this->addRow($newRow); } }</pre> </div> </figure> </div> <div class="example-item" id="0xab83790010aa5685abe55c3f25e0beb6a73800ce6d003a7aa6f9712cddac3252-257,,279,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#9</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_9" data-hash="0xab83790010aa5685abe55c3f25e0beb6a73800ce6d003a7aa6f9712cddac3252" data-area="257,,279,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '9')" class="rating-up btn btn-success" data-id="rating_9"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'9')" class="rating-down btn btn-danger" data-id="rating_9"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0xab83790010aa5685abe55c3f25e0beb6a73800ce6d003a7aa6f9712cddac3252-257,,279,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0xab83790010aa5685abe55c3f25e0beb6a73800ce6d003a7aa6f9712cddac3252&fullName=src%2Fpages%2Fwsp-admin%2Fmanage-translations.php&project=kxopa%2FWebSite-PHP')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fkxopa%2FWebSite-PHP%2Fblob%2Fmaster%2Fsrc%2Fpages%2Fwsp-admin%2Fmanage-translations.php">manage-translations.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fkxopa%2FWebSite-PHP">kxopa/WebSite-PHP</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="9"> <pre class="line-numbers language-php" data-end="279" data-start="258" data-highlight="260,261,262,263,275"> private function addDraggableTranslationEditor($label_name, $label_value) { $label_input = new TextArea($this->form); $label_input->setAutoHeight(); $label_input->setValue(str_replace("\\'", "'", $label_value)); $label_input->setName("TextArea_" . $label_name)->setWidth(320); // Saved position of the label when dragged $hdn_label = new Hidden($this->form, "Hdn_Position_" . $label_name); $hdn_label->setValue(sizeof($this->array_translation_position) + 1); $this->array_translation_position[$label_name] = $hdn_label; // Create draggable label object $translate_obj = new Object(); $translate_obj->setWidth(588)->setId("Draggable_" . $label_name); $pic_drag = new Picture("wsp/img/drag_arrow_16x16.png", 16, 16, 0, Picture::ALIGN_ABSMIDDLE); $pic_drag->setStyle("cursor:pointer;"); $label_obj = new Object($pic_drag, $label_name . ": "); $label_obj->setWidth(250)->setStyle("float: left;"); $translate_obj->add($label_obj, $hdn_label, $label_input); if (!$this->btn_save->isClicked() && !$this->sort_label_event->isSorted() && !$this->btn_add_label->isClicked()) { $this->translate_area->add($translate_obj); } $this->array_translation_input[$label_name] = $label_input; }</pre> </div> </figure> </div> <div class="example-item" id="0xac4e057864c419c70bffdb96ff18e4d3bf861cf139da960d5165872bd0ddc0f3-13,,22,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#10</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_10" data-hash="0xac4e057864c419c70bffdb96ff18e4d3bf861cf139da960d5165872bd0ddc0f3" data-area="13,,22,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '10')" class="rating-up btn btn-success" data-id="rating_10"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'10')" class="rating-down btn btn-danger" data-id="rating_10"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0xac4e057864c419c70bffdb96ff18e4d3bf861cf139da960d5165872bd0ddc0f3-13,,22,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0xac4e057864c419c70bffdb96ff18e4d3bf861cf139da960d5165872bd0ddc0f3&fullName=libs%2FCustom%2FRichTextArea.php&project=radypala%2Fmaga-website')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fradypala%2Fmaga-website%2Fblob%2Fmaster%2Flibs%2FCustom%2FRichTextArea.php">RichTextArea.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fradypala%2Fmaga-website">radypala/maga-website</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="10"> <pre class="line-numbers language-php" data-end="22" data-start="14" data-highlight="20"> /** * Generates control's HTML element. * @return Html */ public function getControl() { $control = parent::getControl(); $control->class = $this->className; return $control; }</pre> </div> </figure> </div> <div class="example-item" id="0x1e079f77c92033c853a5e4ceb51e7db7590885d05668658e375f2c30a566b612-198,,218,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#11</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_11" data-hash="0x1e079f77c92033c853a5e4ceb51e7db7590885d05668658e375f2c30a566b612" data-area="198,,218,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '11')" class="rating-up btn btn-success" data-id="rating_11"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'11')" class="rating-down btn btn-danger" data-id="rating_11"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0x1e079f77c92033c853a5e4ceb51e7db7590885d05668658e375f2c30a566b612-198,,218,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0x1e079f77c92033c853a5e4ceb51e7db7590885d05668658e375f2c30a566b612&fullName=src%2Fclass.Editor.php&project=jwiegel%2FFormHandler')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fjwiegel%2FFormHandler%2Fblob%2Fmaster%2Fsrc%2Fclass.Editor.php">class.Editor.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fjwiegel%2FFormHandler">jwiegel/FormHandler</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="11"> <pre class="line-numbers language-php" data-end="218" data-start="199" data-highlight="215"> /** * Editor::getField() * * return the field * * @return string: the field * @author Teye Heimans * @access public */ function getField() { // view mode enabled ? if ($this->getViewMode()) { // get the view value.. return $this->_getViewValue(); } $html = parent::getField(); // add the javascript needed for the js calendar field $this->_oForm->_setJS("\n\t\t\tCKEDITOR.replace( '" . $this->_sName . "', " . json_encode($this->_oEditor->config) . " );\t\t\n\t\t", 0, 0); return $html; }</pre> </div> </figure> </div> <div class="example-item" id="0xa879939d4c56c0bc66c7918fa5bf5368472a54d2d6a782a5cfc87f371bbdf3da-22,,26,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#12</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_12" data-hash="0xa879939d4c56c0bc66c7918fa5bf5368472a54d2d6a782a5cfc87f371bbdf3da" data-area="22,,26,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '12')" class="rating-up btn btn-success" data-id="rating_12"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'12')" class="rating-down btn btn-danger" data-id="rating_12"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0xa879939d4c56c0bc66c7918fa5bf5368472a54d2d6a782a5cfc87f371bbdf3da-22,,26,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0xa879939d4c56c0bc66c7918fa5bf5368472a54d2d6a782a5cfc87f371bbdf3da&fullName=src%2FWellCommerce%2FBundle%2FCoreBundle%2FForm%2FRichTextEditor.php&project=jmarceli%2FWellCommerce')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fjmarceli%2FWellCommerce%2Fblob%2Fmaster%2Fsrc%2FWellCommerce%2FBundle%2FCoreBundle%2FForm%2FRichTextEditor.php">RichTextEditor.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fjmarceli%2FWellCommerce">jmarceli/WellCommerce</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="12"> <pre class="line-numbers language-php" data-end="26" data-start="23" data-highlight="25"> public function __construct($attributes) { parent::__construct($attributes); $this->attributes['advanced'] = true; }</pre> </div> </figure> </div> <div class="example-item" id="0xf82b3836d0b5a1a91dd9e6d7f620547cca4f8c23071643ca582075bd1a2b8125-826,,861,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#13</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_13" data-hash="0xf82b3836d0b5a1a91dd9e6d7f620547cca4f8c23071643ca582075bd1a2b8125" data-area="826,,861,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '13')" class="rating-up btn btn-success" data-id="rating_13"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'13')" class="rating-down btn btn-danger" data-id="rating_13"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0xf82b3836d0b5a1a91dd9e6d7f620547cca4f8c23071643ca582075bd1a2b8125-826,,861,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0xf82b3836d0b5a1a91dd9e6d7f620547cca4f8c23071643ca582075bd1a2b8125&fullName=system%2Fmodules%2FModuleTasks.php&project=narrenfrei%2Fcore')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fnarrenfrei%2Fcore%2Fblob%2Fmaster%2Fsystem%2Fmodules%2FModuleTasks.php">ModuleTasks.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fnarrenfrei%2Fcore">narrenfrei/core</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="13"> <pre class="line-numbers language-php" data-end="861" data-start="827" data-highlight="834,853,855,861"> /** * Return the comment widget as object * @param mixed * @return Widget */ protected function getCommentWidget($value=null) { $widget = new TextArea(); $widget->id = 'comment'; $widget->name = 'comment'; $widget->mandatory = true; $widget->decodeEntities = true; $widget->style = 'height:120px;'; $widget->value = $value; $widget->label = $GLOBALS['TL_LANG']['tl_task']['comment'][0]; if ($GLOBALS['TL_CONFIG']['showHelp'] && $GLOBALS['TL_LANG']['tl_task']['comment'][1] != '') { $widget->help = $GLOBALS['TL_LANG']['tl_task']['comment'][1]; } // Valiate input if ($this->Input->post('FORM_SUBMIT') == 'tl_tasks') { $widget->validate(); if ($widget->hasErrors()) { $this->blnSave = false; } } return $widget; }</pre> </div> </figure> </div> <div class="example-item" id="0xef2f14448bf359632fff158f1c44a88db3535ac2350d0ed45eebd849fe87a798-481,,515,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#14</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_14" data-hash="0xef2f14448bf359632fff158f1c44a88db3535ac2350d0ed45eebd849fe87a798" data-area="481,,515,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '14')" class="rating-up btn btn-success" data-id="rating_14"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'14')" class="rating-down btn btn-danger" data-id="rating_14"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0xef2f14448bf359632fff158f1c44a88db3535ac2350d0ed45eebd849fe87a798-481,,515,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0xef2f14448bf359632fff158f1c44a88db3535ac2350d0ed45eebd849fe87a798&fullName=class.FormHandler.php&project=jwiegel%2FFormHandler')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fjwiegel%2FFormHandler%2Fblob%2Fmaster%2Fclass.FormHandler.php">class.FormHandler.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fjwiegel%2FFormHandler">jwiegel/FormHandler</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="14"> <pre class="line-numbers language-php" data-end="515" data-start="482" data-highlight="501,503,506,509,512,515"> /** * FormHandler::textArea() * * Create a textarea on the form * * @param string $title: The title of the field * @param string $name: The name of the field * @param string $validator: The validator which should be used to validate the value of the field * @param int $cols: How many cols (the width of the field) * @param int $rows: How many rows (the height of the field) * @param string $extra: CSS, Javascript or other which are inserted into the HTML tag * @return void * @access public * @author Teye Heimans */ function textArea($title, $name, $validator = null, $cols = null, $rows = null, $extra = null) { require_once FH_INCLUDE_DIR . 'fields/class.TextArea.php'; // create new textarea $fld = new TextArea($this, $name); if (!empty($validator)) { $fld->setValidator($validator); } if (!empty($cols)) { $fld->setCols($cols); } if (!empty($rows)) { $fld->setRows($rows); } if (!empty($extra)) { $fld->setExtra($extra); } // register the field $this->_registerField($name, $fld, $title); }</pre> </div> </figure> </div> <div class="example-item" id="0x208ac98667367951f48ddcfd80ef1e982825946f4e421355d16d35ddd68c6f47-0,,14,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#15</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_15" data-hash="0x208ac98667367951f48ddcfd80ef1e982825946f4e421355d16d35ddd68c6f47" data-area="0,,14,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '15')" class="rating-up btn btn-success" data-id="rating_15"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'15')" class="rating-down btn btn-danger" data-id="rating_15"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0x208ac98667367951f48ddcfd80ef1e982825946f4e421355d16d35ddd68c6f47-0,,14,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0x208ac98667367951f48ddcfd80ef1e982825946f4e421355d16d35ddd68c6f47&fullName=MVCWP-Lib%2Fvendor%2FPhi%2FForms%2FTest.php&project=AnthonyMassie%2FMVC-Framework-for-WP-Plugins')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2FAnthonyMassie%2FMVC-Framework-for-WP-Plugins%2Fblob%2Fmaster%2FMVCWP-Lib%2Fvendor%2FPhi%2FForms%2FTest.php">Test.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2FAnthonyMassie%2FMVC-Framework-for-WP-Plugins">AnthonyMassie/MVC-Framework-for-WP-Plugins</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="15"> <pre class="line-numbers language-php" data-end="14" data-start="1" data-highlight="11,12,13,14,15"><?php namespace Phi\Form\Element; require './Exception/InvalidAttributeException.php'; require './Element.php'; require './TextNode.php'; require './TextArea.php'; require './Input.php'; require './Text.php'; $text = new TextArea(); $text->addChild(new Text()); $text->addChild(new Text()); $text->addChild(new Text()); echo $text->getHTML();</pre> </div> </figure> </div> <div class="example-item" id="0x3cf2483c59390d6df42cda8aabfac32c40c147e372b52fe953609627e16d8635-251,,264,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#16</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_16" data-hash="0x3cf2483c59390d6df42cda8aabfac32c40c147e372b52fe953609627e16d8635" data-area="251,,264,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '16')" class="rating-up btn btn-success" data-id="rating_16"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'16')" class="rating-down btn btn-danger" data-id="rating_16"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0x3cf2483c59390d6df42cda8aabfac32c40c147e372b52fe953609627e16d8635-251,,264,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0x3cf2483c59390d6df42cda8aabfac32c40c147e372b52fe953609627e16d8635&fullName=htdocs%2Fxoops_lib%2FXoops%2FDhtmlTextArea.php&project=redmexico%2FXoopsCore')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fredmexico%2FXoopsCore%2Fblob%2Fmaster%2Fhtdocs%2Fxoops_lib%2FXoops%2FDhtmlTextArea.php">DhtmlTextArea.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fredmexico%2FXoopsCore">redmexico/XoopsCore</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="16"> <pre class="line-numbers language-php" data-end="264" data-start="252" data-highlight="264"> /** * renderValidationJS * * @return bool|string */ public function renderValidationJS() { if ($this->htmlEditor && is_object($this->htmlEditor) && method_exists($this->htmlEditor, 'renderValidationJS')) { if (!isset($this->htmlEditor->isEnabled) || $this->htmlEditor->isEnabled) { return $this->htmlEditor->renderValidationJS(); } } return parent::renderValidationJS(); }</pre> </div> </figure> </div> <div class="example-item" id="0x2554d91d921d7c3c5d4c94dfa43d7640779add58ad662c7d8866d6fe91c1fb51-307,,324,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#17</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_17" data-hash="0x2554d91d921d7c3c5d4c94dfa43d7640779add58ad662c7d8866d6fe91c1fb51" data-area="307,,324,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '17')" class="rating-up btn btn-success" data-id="rating_17"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'17')" class="rating-down btn btn-danger" data-id="rating_17"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0x2554d91d921d7c3c5d4c94dfa43d7640779add58ad662c7d8866d6fe91c1fb51-307,,324,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0x2554d91d921d7c3c5d4c94dfa43d7640779add58ad662c7d8866d6fe91c1fb51&fullName=TinyMCE.php&project=noloh%2FTinyMCE')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fnoloh%2FTinyMCE%2Fblob%2Fmaster%2FTinyMCE.php">TinyMCE.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fnoloh%2FTinyMCE">noloh/TinyMCE</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="17"> <pre class="line-numbers language-php" data-end="324" data-start="308" data-highlight="313"> /** * Do not call manually! Override of default Show(). Triggers when tinyMCE instance is initially shown. */ function Show() { parent::Show(); $relativePath = System::GetRelativePath(getcwd(), dirname(__FILE__)); //Add tinymce script files ClientScript::AddSource($relativePath . 'tinymce/jscripts/tiny_mce/tiny_mce.js', false); /*Add NOLOH bridge script file*/ //Debug Version // ClientScript::AddSource($relativePath . 'Bridge/bridge.js', false); //Minified Version ClientScript::AddSource($relativePath . 'Bridge/bridge-min.js', false); $args = ClientScript::ClientFormat($this->Config); ClientScript::RaceQueue($this, 'tinymce', "var e=new tinymce.Editor('$this', $args);e.render();"); }</pre> </div> </figure> </div> <div class="example-item" id="0xf5058ec7d8fdd2e102de3f69229edea34d01cdd5e5e616dac1ea32dbc3a6b2e0-332,,370,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#18</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_18" data-hash="0xf5058ec7d8fdd2e102de3f69229edea34d01cdd5e5e616dac1ea32dbc3a6b2e0" data-area="332,,370,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '18')" class="rating-up btn btn-success" data-id="rating_18"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'18')" class="rating-down btn btn-danger" data-id="rating_18"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0xf5058ec7d8fdd2e102de3f69229edea34d01cdd5e5e616dac1ea32dbc3a6b2e0-332,,370,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0xf5058ec7d8fdd2e102de3f69229edea34d01cdd5e5e616dac1ea32dbc3a6b2e0&fullName=FrontRenderer.php&project=rjpijpker%2Fnefub-mobile')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Frjpijpker%2Fnefub-mobile%2Fblob%2Fmaster%2FFrontRenderer.php">FrontRenderer.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Frjpijpker%2Fnefub-mobile">rjpijpker/nefub-mobile</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="18"> <pre class="line-numbers language-php" data-end="370" data-start="333" data-highlight="346,347,348"> /** * * Show/handle feedback form */ public function showFeedback() { $form = new Form(); $inputName = new InputText('name'); $inputName->addValidator(new Validator()); $form->addElement($inputName, 'Naam (verplicht)'); $inputEmail = new InputText('email'); $inputEmail->addValidator(new EmailValidator(false)); $form->addElement($inputEmail, 'E-mailadres (niet verplicht)'); $inputMessage = new TextArea('comment'); $inputMessage->addValidator(new LengthValidator(true, 20, 1000)); $form->addElement($inputMessage, 'Feedback (verplicht)'); $this->assign('form', $form); $this->template = '/feedback/feedback.form.tpl'; // Validate if this form has just been posted if ($form->isPosted()) { $form->validate(); if ($form->getErrors()) { $this->assign('hasErrors', true); $this->assign('errors', $form->getErrors()); } else { // Save feedback $oFeedback = new Feedback(); $oFeedback->name = htmlentities($inputName->getValue()); $oFeedback->email = htmlentities($inputEmail->getValue()); $oFeedback->message = htmlentities($inputMessage->getValue()); $oFeedback->ip = $_SERVER['REMOTE_ADDR']; $oFeedback->save(); $this->assign('feedback', $oFeedback); $this->template = '/feedback/feedback.confirm.tpl'; } } $this->assignSettings(); $this->smarty->display('templates' . $this->template); }</pre> </div> </figure> </div> <div class="example-item" id="0xa46a4e6860742aea34ec256153205e23b712becba9993810a87130e4c6e67cce-6,,16,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#19</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_19" data-hash="0xa46a4e6860742aea34ec256153205e23b712becba9993810a87130e4c6e67cce" data-area="6,,16,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '19')" class="rating-up btn btn-success" data-id="rating_19"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'19')" class="rating-down btn btn-danger" data-id="rating_19"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0xa46a4e6860742aea34ec256153205e23b712becba9993810a87130e4c6e67cce-6,,16,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0xa46a4e6860742aea34ec256153205e23b712becba9993810a87130e4c6e67cce&fullName=src%2FWysiwyg.php&project=parfumix%2Fform-builder')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fparfumix%2Fform-builder%2Fblob%2Fmaster%2Fsrc%2FWysiwyg.php">Wysiwyg.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Fparfumix%2Fform-builder">parfumix/form-builder</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="19"> <pre class="line-numbers language-php" data-end="16" data-start="7" data-highlight="14"> /** * Render * * @return string */ public function render() { $html = parent::render(); $html .= $this->getJs(); return $html; }</pre> </div> </figure> </div> <div class="example-item" id="0xffb48a17b8da022e29e474a9e95220319a64913cc9c9d763c7144065aedae56c-415,,426,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#20</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_20" data-hash="0xffb48a17b8da022e29e474a9e95220319a64913cc9c9d763c7144065aedae56c" data-area="415,,426,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '20')" class="rating-up btn btn-success" data-id="rating_20"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'20')" class="rating-down btn btn-danger" data-id="rating_20"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0xffb48a17b8da022e29e474a9e95220319a64913cc9c9d763c7144065aedae56c-415,,426,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0xffb48a17b8da022e29e474a9e95220319a64913cc9c9d763c7144065aedae56c&fullName=lcs-claro%2FClaro%2Fclaroline%2Finc%2Fform.class.php&project=rhertzog%2Flcs')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Frhertzog%2Flcs%2Fblob%2Fmaster%2Flcs-claro%2FClaro%2Fclaroline%2Finc%2Fform.class.php">form.class.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2Frhertzog%2Flcs">rhertzog/lcs</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="20"> <pre class="line-numbers language-php" data-end="426" data-start="416" data-highlight="418,419,420,421,422,423,424,425,426"> public static function Factory($name, $value, $label = '', $required = false, $wysiwyg = false, $cols = 80, $rows = 20, $attrList = array()) { $element = new TextArea($name); $element->setValue($value); $element->setLabel($label); $element->setRequired($required); $element->setOptionList($attrList); $element->useWysiwyg($wysiwyg); $element->setRows($rows); $element->setCols($cols); return $element; }</pre> </div> </figure> </div> <div class="example-item" id="0x1b4a12096107031f2485c17ed856f14ed1baf4e59ccccca0d0f6d1637e284aeb-16,,46,"> <div class="bs-example"> <div> <div class="bs-example-title">示例#21</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_21" data-hash="0x1b4a12096107031f2485c17ed856f14ed1baf4e59ccccca0d0f6d1637e284aeb" data-area="16,,46,"> <div class="rating-amount">0</div> <a title="将此示例标记为好" href="javascript:app.addRating(1, '21')" class="rating-up btn btn-success" data-id="rating_21"><i class="icon-button icon-thumbs-up"></i></a> <a title="将此示例标记为差" href="javascript:app.addRating(-1,'21')" class="rating-down btn btn-danger" data-id="rating_21"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="这个示例的直接链接" href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html#0x1b4a12096107031f2485c17ed856f14ed1baf4e59ccccca0d0f6d1637e284aeb-16,,46,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/zh/site/file?hash=0x1b4a12096107031f2485c17ed856f14ed1baf4e59ccccca0d0f6d1637e284aeb&fullName=libraries%2Fpiwi%2Fpiwixml.php&project=Dulciane%2Fjaws')">显示文件</a> </div> <div class="example-project-info"> <nobr> <span>文件:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2FDulciane%2Fjaws%2Fblob%2Fmaster%2Flibraries%2Fpiwi%2Fpiwixml.php">piwixml.php</a> </nobr> <nobr> <span>项目:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/zh/site/redirect?url=https%3A%2F%2Fgithub.com%2FDulciane%2Fjaws">Dulciane/jaws</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="21"> <pre class="line-numbers language-php" data-end="46" data-start="17" data-highlight="32,33,94">$combogroup = new ComboGroup("opciones2"); $pares = array(); $impares = array(); for ($i = 0; $i < 20; $i++) { if ($i % 2 == 0) { $pares[] = new ComboOption("numero {$i}", "Número {$i}"); } else { $impares[] = new ComboOption("numero {$i}", "Número {$i}"); } } $combogroup->AddGroup("pares", "pares", $pares); $combogroup->AddGroup("impares", "impares", $impares, true); $combogroup->SetDefault("pares", "Número 2"); echo $combogroup->GetPiwiXML(); echo "\n\n\n"; $textarea = new TextArea("textarea", "Texto"); echo $textarea->GetPiwiXML(); echo "\n\n\n"; $entry = new Entry("cajita", "Una cosa"); $entry->AddEvent(new JSEvent(ON_CHANGE, "javascript:alert(this.value)")); $entry->AddEvent(new JSEvent(ON_CHANGE, "javascript:alert(calcMD5(this.value));", "http://jaws.com.mx/templates/controlpanel/md5.js")); echo $entry->GetPiwiXML(); echo "\n\n\n"; $comboimage = new ComboImage("comboimage"); $comboimage->AddOption("Jaws Proyect", "jawsproject", STOCK_CANCEL); $comboimage->AddOption("Piwi Proyect", "piwi", STOCK_CANCEL); $comboimage->AddOption("mBloggy", "mbloggy", "http://www.w3schools.com/images/dnicon.gif"); $comboimage->SetDefault("mbloggy"); echo $comboimage->GetPiwiXML(); echo "\n\n\n"; $radio = new RadioButtons("favoritos", "vertical");</pre> </div> </figure> </div> <div id="all-examples"></div> </div> </div> </div> <div class="page-side-banner hidden-xs hidden-sm hidden-md" style="width:300px"> <div id="ezoic-pub-ad-placeholder-131"> <div class="fx" style="width:300px"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- right-sidebar-fx --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="8968655429" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> </div> </div> <footer class="footer"> <div class="container"> <div class="row"> <div class="col-md-12" style="text-align: center"> <a href="https://hotexamples.com/zh/site/trends?type=php%7Cf">热门功能</a> | <a href="https://hotexamples.com/zh/site/trends?type=php%7Cc"> 热门类 </a> | <a href="https://doc.hotexamples.com/zh/doc/map">文档</a> | <a href="/site/privacy">隐私政策</a> | <a href="https://cpp.hotexamples.com/direct-sales.html">Advertise with us</a> </div> </div> <div class="row"> <div class="col-md-12" style="text-align: center"> <a href="https://hotexamples.com/zh/">PHP</a> | <a href="https://csharp.hotexamples.com/zh/">C# (CSharp)</a> | <a href="https://java.hotexamples.com/zh/">Java</a> | <a href="https://golang.hotexamples.com/zh/">Golang</a> | <a href="https://cpp.hotexamples.com/zh/">C++ (Cpp)</a> | <a href="https://python.hotexamples.com/zh/">Python</a> | <a href="https://javascript.hotexamples.com/zh/">JavaScript</a> | <a href="https://typescript.hotexamples.com/zh/">TypeScript</a> </div> </div> <div class="row"> <div class="col-md-12" style="text-align: center"> <a href="https://hotexamples.com/examples/-/TextArea/-/php-textarea-class-examples.html">EN</a> | <a href="https://hotexamples.com/ru/examples/-/TextArea/-/php-textarea-class-examples.html">RU</a> | <a href="https://hotexamples.com/de/examples/-/TextArea/-/php-textarea-class-examples.html">DE</a> | <a href="https://hotexamples.com/fr/examples/-/TextArea/-/php-textarea-class-examples.html">FR</a> | <a href="https://hotexamples.com/es/examples/-/TextArea/-/php-textarea-class-examples.html">ES</a> | <a href="https://hotexamples.com/pt/examples/-/TextArea/-/php-textarea-class-examples.html">PT</a> | <a href="https://hotexamples.com/it/examples/-/TextArea/-/php-textarea-class-examples.html">IT</a> | <a href="https://hotexamples.com/jp/examples/-/TextArea/-/php-textarea-class-examples.html">JP</a> | <a href="https://hotexamples.com/zh/examples/-/TextArea/-/php-textarea-class-examples.html">ZH</a> | <a href="https://hotexamples.com/ko/examples/-/TextArea/-/php-textarea-class-examples.html">KO</a> </div> </div> <div class="row"> <div class="col-md-10 col-md-offset-1"> </div> <div class="col-md-1"> <!--LiveInternet counter--> <script type="text/javascript"><!-- document.write("<a href='//www.liveinternet.ru/click' " + "target=_blank><img src='//counter.yadro.ru/hit?t44.6;r" + escape(document.referrer) + ((typeof (screen) == "undefined") ? "" : ";s" + screen.width + "*" + screen.height + "*" + (screen.colorDepth ? screen.colorDepth : screen.pixelDepth)) + ";u" + escape(document.URL) + ";" + Math.random() + "' alt='' title='LiveInternet' " + "border='0' width='31' height='31'><\/a>"); //--></script><!--/LiveInternet--> </div> </div> </div> </footer> <script src="//ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="/assets/30dd86a6f06b64184847037c52c63e07aa3c9a26.js"></script> <script>jQuery(function ($) { jQuery('#search-form').yiiActiveForm([{"id":"searchform-lang","name":"lang","container":".field-searchform-lang","input":"#searchform-lang","enableAjaxValidation":true},{"id":"searchform-search","name":"search","container":".field-searchform-search","input":"#searchform-search","enableAjaxValidation":true,"validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"Search cannot be blank."});}}], []); });</script></body> </html>