PHP xml::label Examples

Programming Language: PHP
Class/Type: xml
Method/Function: label
Examples at hotexamples.com: 2
PHP has many built-in functions for working with XML, including simplexml and DOMDocument. These functions make it easy to create, manipulate, and parse XML data.

Here are some examples:

1. Creating an XML file using simplexml:

$xml = new SimpleXMLElement('');
$movie = $xml->addChild('movie');
$movie->addChild('title', 'The Shawshank Redemption');
$movie->addChild('year', '1994');
$movie->addChild('director', 'Frank Darabont');

This code creates an XML file with a root element of ``, and adds a child element `` with three child elements ``, `<year>`, and `<director>`.<br><br>2. Parsing an XML file using DOMDocument:<br><br>$xml = new DOMDocument();<br>$xml->load('movies.xml');<br>$movies = $xml->getElementsByTagName('movie');<br>foreach ($movies as $movie) {<br> $title = $movie->getElementsByTagName('title')->item(0)->nodeValue;<br> $year = $movie->getElementsByTagName('year')->item(0)->nodeValue;<br> $director = $movie->getElementsByTagName('director')->item(0)->nodeValue;<br> echo "$title ($year) - $director\n";<br>}<br><br>This code loads an XML file called `movies.xml` and gets all the child elements of `<movie>`. For each movie, it retrieves the values of the `<title>`, `<year>`, and `<director>` elements and prints them out.<br><br>The package library used in these examples is the default PHP extension for XML processing.</div> <strong>PHP xml::label - 2 examples found</strong>. These are the top rated real world PHP examples of <strong>xml::label</strong> extracted from open source projects. You can rate examples to help us improve the quality of examples. </div> <div class="hidden-xs"> <div id="ezoic-pub-ad-placeholder-130"> </div> </div> </div> <div id="ezoic-pub-ad-placeholder-105"> <div style="text-align: center; margin-top: 10px"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- after-description --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="5330879504" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="visible-xs visible-sm visible-md"> <div class="bs-example thin" style="margin-top: 15px"> <div class="bs-example-title">Frequently Used Methods</div> <div class="fields-controls visible-sm visible-xs visible-md"> <a class="btn btn-default fields-show-btn" data-toggle="collapse" href="#fields-panel-mobile" aria-expanded="false" aria-controls="fields-panel">Show</a> <a class="btn btn-default fields-hide-btn" data-toggle="collapse" href="#fields-panel-mobile" aria-expanded="false" aria-controls="fields-panel">Hide</a> </div> </div> <figure class="highlight panel fields-panel collapse" id="fields-panel-mobile"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/to_XML/php-xml-to_xml-method-examples.html">to_XML(22)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/de/php-xml-de-method-examples.html">de(15)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/parse/php-xml-parse-method-examples.html">parse(12)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/query/php-xml-query-method-examples.html">query(11)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/append/php-xml-append-method-examples.html">append(11)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/createElement/php-xml-createelement-method-examples.html">createElement(10)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/element/php-xml-element-method-examples.html">element(10)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/importNode/php-xml-importnode-method-examples.html">importNode(9)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/evaluate/php-xml-evaluate-method-examples.html">evaluate(7)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/getElementText/php-xml-getelementtext-method-examples.html">getElementText(7)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/load/php-xml-load-method-examples.html">load(6)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get_tag_content/php-xml-get_tag_content-method-examples.html">get_tag_content(5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/setElementText/php-xml-setelementtext-method-examples.html">setElementText(5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/spliceData/php-xml-splicedata-method-examples.html">spliceData(5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xml_to_array/php-xml-xml_to_array-method-examples.html">xml_to_array(5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/load_file/php-xml-load_file-method-examples.html">load_file(4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/strip_invisible_tags/php-xml-strip_invisible_tags-method-examples.html">strip_invisible_tags(4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/strip_visible_tags/php-xml-strip_visible_tags-method-examples.html">strip_visible_tags(4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/appendChild/php-xml-appendchild-method-examples.html">appendChild(4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/write_master_tag/php-xml-write_master_tag-method-examples.html">write_master_tag(4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/write_tag/php-xml-write_tag-method-examples.html">write_tag(4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xml2array/php-xml-xml2array-method-examples.html">xml2array(4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/__construct/php-xml-__construct-method-examples.html">__construct(4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/getElementById/php-xml-getelementbyid-method-examples.html">getElementById(3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/fetch/php-xml-fetch-method-examples.html">fetch(3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get_xml_file/php-xml-get_xml_file-method-examples.html">get_xml_file(3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/getUrl/php-xml-geturl-method-examples.html">getUrl(3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xmlstrtoarr/php-xml-xmlstrtoarr-method-examples.html">xmlstrtoarr(3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/array2xml/php-xml-array2xml-method-examples.html">array2xml(3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/encode/php-xml-encode-method-examples.html">encode(3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/addChild/php-xml-addchild-method-examples.html">addChild(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/generate_element_attribute_map/php-xml-generate_element_attribute_map-method-examples.html">generate_element_attribute_map(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get/php-xml-get-method-examples.html">get(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/save/php-xml-save-method-examples.html">save(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/transform/php-xml-transform-method-examples.html">transform(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get_node_text/php-xml-get_node_text-method-examples.html">get_node_text(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get_xml_element/php-xml-get_xml_element-method-examples.html">get_xml_element(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/from_array/php-xml-from_array-method-examples.html">from_array(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xml_to_DOM_node/php-xml-xml_to_dom_node-method-examples.html">xml_to_DOM_node(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/import/php-xml-import-method-examples.html">import(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xml_unserialize/php-xml-xml_unserialize-method-examples.html">xml_unserialize(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/output/php-xml-output-method-examples.html">output(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/ordered2xml/php-xml-ordered2xml-method-examples.html">ordered2xml(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/json/php-xml-json-method-examples.html">json(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/label/php-xml-label-method-examples.html">label(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/setOverWrite/php-xml-setoverwrite-method-examples.html">setOverWrite(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/saveXML/php-xml-savexml-method-examples.html">saveXML(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/setPath/php-xml-setpath-method-examples.html">setPath(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/cElementChild/php-xml-celementchild-method-examples.html">cElementChild(2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/createXMLFile/php-xml-createxmlfile-method-examples.html">createXMLFile(2)</a> </div> </figure> </div> </div> <div class="page-content-container"> <div class="sidebar hidden-xs hidden-sm hidden-md" style="width:300px"> <div id="ezoic-pub-ad-placeholder-101"> <div style="text-align: center; margin-top: 10px"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- left-sidebar-1 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="7161345231" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="bs-example thin"> <div class="bs-example-title"> Frequently Used Methods </div> </div> <figure class="highlight panel fields-panel " id="fields-panel"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/to_XML/php-xml-to_xml-method-examples.html">to_XML (22)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/de/php-xml-de-method-examples.html">de (15)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/parse/php-xml-parse-method-examples.html">parse (12)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/query/php-xml-query-method-examples.html">query (11)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/append/php-xml-append-method-examples.html">append (11)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/createElement/php-xml-createelement-method-examples.html">createElement (10)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/element/php-xml-element-method-examples.html">element (10)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/importNode/php-xml-importnode-method-examples.html">importNode (9)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/evaluate/php-xml-evaluate-method-examples.html">evaluate (7)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/getElementText/php-xml-getelementtext-method-examples.html">getElementText (7)</a> </div> </figure> <div id="ezoic-pub-ad-placeholder-102"> <div style="text-align: center; margin-bottom: 10px"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- left-sidebar-2 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="7075206013" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="bs-example thin"> <div class="bs-example-title"> Frequently Used Methods </div> </div> <figure class="highlight panel fields-panel " id="fields-panel"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/load/php-xml-load-method-examples.html">load (6)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get_tag_content/php-xml-get_tag_content-method-examples.html">get_tag_content (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/setElementText/php-xml-setelementtext-method-examples.html">setElementText (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/spliceData/php-xml-splicedata-method-examples.html">spliceData (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xml_to_array/php-xml-xml_to_array-method-examples.html">xml_to_array (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/load_file/php-xml-load_file-method-examples.html">load_file (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/strip_invisible_tags/php-xml-strip_invisible_tags-method-examples.html">strip_invisible_tags (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/strip_visible_tags/php-xml-strip_visible_tags-method-examples.html">strip_visible_tags (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/appendChild/php-xml-appendchild-method-examples.html">appendChild (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/write_master_tag/php-xml-write_master_tag-method-examples.html">write_master_tag (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/write_tag/php-xml-write_tag-method-examples.html">write_tag (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xml2array/php-xml-xml2array-method-examples.html">xml2array (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/__construct/php-xml-__construct-method-examples.html">__construct (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/getElementById/php-xml-getelementbyid-method-examples.html">getElementById (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/fetch/php-xml-fetch-method-examples.html">fetch (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get_xml_file/php-xml-get_xml_file-method-examples.html">get_xml_file (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/getUrl/php-xml-geturl-method-examples.html">getUrl (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xmlstrtoarr/php-xml-xmlstrtoarr-method-examples.html">xmlstrtoarr (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/array2xml/php-xml-array2xml-method-examples.html">array2xml (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/encode/php-xml-encode-method-examples.html">encode (3)</a> </div> </figure> <div id="ezoic-pub-ad-placeholder-117"> </div> <div class="bs-example thin"> <div class="bs-example-title"> Frequently Used Methods </div> </div> <figure class="highlight panel fields-panel " id="fields-panel"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/write_tag/php-xml-write_tag-method-examples.html">write_tag (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xml2array/php-xml-xml2array-method-examples.html">xml2array (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/__construct/php-xml-__construct-method-examples.html">__construct (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/getElementById/php-xml-getelementbyid-method-examples.html">getElementById (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/fetch/php-xml-fetch-method-examples.html">fetch (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get_xml_file/php-xml-get_xml_file-method-examples.html">get_xml_file (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/getUrl/php-xml-geturl-method-examples.html">getUrl (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xmlstrtoarr/php-xml-xmlstrtoarr-method-examples.html">xmlstrtoarr (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/array2xml/php-xml-array2xml-method-examples.html">array2xml (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/encode/php-xml-encode-method-examples.html">encode (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/addChild/php-xml-addchild-method-examples.html">addChild (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/generate_element_attribute_map/php-xml-generate_element_attribute_map-method-examples.html">generate_element_attribute_map (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get/php-xml-get-method-examples.html">get (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/save/php-xml-save-method-examples.html">save (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/transform/php-xml-transform-method-examples.html">transform (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get_node_text/php-xml-get_node_text-method-examples.html">get_node_text (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get_xml_element/php-xml-get_xml_element-method-examples.html">get_xml_element (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/from_array/php-xml-from_array-method-examples.html">from_array (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xml_to_DOM_node/php-xml-xml_to_dom_node-method-examples.html">xml_to_DOM_node (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/import/php-xml-import-method-examples.html">import (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xml_unserialize/php-xml-xml_unserialize-method-examples.html">xml_unserialize (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/output/php-xml-output-method-examples.html">output (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/ordered2xml/php-xml-ordered2xml-method-examples.html">ordered2xml (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/json/php-xml-json-method-examples.html">json (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/label/php-xml-label-method-examples.html">label (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/setOverWrite/php-xml-setoverwrite-method-examples.html">setOverWrite (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/saveXML/php-xml-savexml-method-examples.html">saveXML (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/setPath/php-xml-setpath-method-examples.html">setPath (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/cElementChild/php-xml-celementchild-method-examples.html">cElementChild (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/createXMLFile/php-xml-createxmlfile-method-examples.html">createXMLFile (2)</a> </div> </figure> <div id="ezoic-pub-ad-placeholder-116"> </div> <div class="hidden-xs hidden-sm"> <div class="bs-example thin"> <div class="bs-example-title">Related in langs</div> </div> <figure class="highlight panel"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://csharp.hotexamples.com/examples/ConDep.Dsl.Operations.Application.Deployment.WindowsService/WindowsServiceOperation/-/php-windowsserviceoperation-class-examples.html">WindowsServiceOperation (C#)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://csharp.hotexamples.com/examples/-/ReturnOperation/-/php-returnoperation-class-examples.html">ReturnOperation (C#)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://cpp.hotexamples.com/examples/-/-/PR_GetEnv/cpp-pr_getenv-function-examples.html">PR_GetEnv (C++)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://cpp.hotexamples.com/examples/-/-/_mm_loadu_si128/cpp-_mm_loadu_si128-function-examples.html">_mm_loadu_si128 (C++)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://golang.hotexamples.com/examples/k8s.io.kubernetes.pkg.api.registered/-/IsEnabledVersion/golang-isenabledversion-function-examples.html">IsEnabledVersion (Go)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://golang.hotexamples.com/examples/github.com.jpfielding.gotest.testutils/-/Assert/golang-assert-function-examples.html">Assert (Go)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://java.hotexamples.com/examples/src.problemas/Investigador/-/java-investigador-class-examples.html">Investigador (Java)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://java.hotexamples.com/examples/prisms.records/SyncRecord/-/java-syncrecord-class-examples.html">SyncRecord (Java)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://python.hotexamples.com/examples/webserver.models/Restaurateur/-/python-restaurateur-class-examples.html">Restaurateur (Python)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://python.hotexamples.com/examples/vispy.gloo.gl/-/glBindRenderbuffer/python-glbindrenderbuffer-function-examples.html">glBindRenderbuffer (Python)</a> </div> </figure> </div> <div class="bs-example thin"> <div class="bs-example-title"> Frequently Used Methods </div> </div> <figure class="highlight panel fields-panel fields-panel-last" id="fields-panel"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/addChild/php-xml-addchild-method-examples.html">addChild (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/generate_element_attribute_map/php-xml-generate_element_attribute_map-method-examples.html">generate_element_attribute_map (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get/php-xml-get-method-examples.html">get (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/save/php-xml-save-method-examples.html">save (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/transform/php-xml-transform-method-examples.html">transform (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get_node_text/php-xml-get_node_text-method-examples.html">get_node_text (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/get_xml_element/php-xml-get_xml_element-method-examples.html">get_xml_element (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/from_array/php-xml-from_array-method-examples.html">from_array (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xml_to_DOM_node/php-xml-xml_to_dom_node-method-examples.html">xml_to_DOM_node (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/import/php-xml-import-method-examples.html">import (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/xml_unserialize/php-xml-xml_unserialize-method-examples.html">xml_unserialize (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/output/php-xml-output-method-examples.html">output (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/ordered2xml/php-xml-ordered2xml-method-examples.html">ordered2xml (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/json/php-xml-json-method-examples.html">json (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/label/php-xml-label-method-examples.html">label (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/setOverWrite/php-xml-setoverwrite-method-examples.html">setOverWrite (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/saveXML/php-xml-savexml-method-examples.html">saveXML (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/setPath/php-xml-setpath-method-examples.html">setPath (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/cElementChild/php-xml-celementchild-method-examples.html">cElementChild (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/createXMLFile/php-xml-createxmlfile-method-examples.html">createXMLFile (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/dd/php-xml-dd-method-examples.html">dd (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/text/php-xml-text-method-examples.html">text (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/decode/php-xml-decode-method-examples.html">decode (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/splicemultidata/php-xml-splicemultidata-method-examples.html">splicemultidata (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/documentURI/php-xml-documenturi-method-examples.html">documentURI (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/children/php-xml-children-method-examples.html">children (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/spliceMultiData/php-xml-splicemultidata-method-examples.html">spliceMultiData (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/toXml/php-xml-toxml-method-examples.html">toXml (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/cElement/php-xml-celement-method-examples.html">cElement (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/toArray/php-xml-toarray-method-examples.html">toArray (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/pad/php-xml-pad-method-examples.html">pad (1)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/load_string/php-xml-load_string-method-examples.html">load_string (1)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/tag_simple/php-xml-tag_simple-method-examples.html">tag_simple (1)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/normalizePath/php-xml-normalizepath-method-examples.html">normalizePath (1)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/open_xml_element/php-xml-open_xml_element-method-examples.html">open_xml_element (1)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/tags/php-xml-tags-method-examples.html">tags (1)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/to_array/php-xml-to_array-method-examples.html">to_array (1)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/setElement/php-xml-setelement-method-examples.html">setElement (1)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/startSection/php-xml-startsection-method-examples.html">startSection (1)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/xml/to_xml/php-xml-to_xml-method-examples.html">to_xml (1)</a> </div> </figure> <div class="hidden-xs hidden-sm"> <div class="bs-example thin"> <div class="bs-example-title">Related</div> </div> <figure class="highlight panel"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/ComposerAutoloaderInit4b8820c5f17960885b8af26441616aa2/-/php-composerautoloaderinit4b8820c5f17960885b8af26441616aa2-class-examples.html">ComposerAutoloaderInit4b8820c5f17960885b8af26441616aa2</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/livefeed/-/php-livefeed-class-examples.html">livefeed</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/-/sieve_rule_form/php-sieve_rule_form-function-examples.html">sieve_rule_form</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/IfwPsn_Vendor_Zend_Validate_File_MimeType/-/php-ifwpsn_vendor_zend_validate_file_mimetype-class-examples.html">IfwPsn_Vendor_Zend_Validate_File_MimeType</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/WP_Role/-/php-wp_role-class-examples.html">WP_Role</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/-/themify_ecommerce_sidebar_before/php-themify_ecommerce_sidebar_before-function-examples.html">themify_ecommerce_sidebar_before</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/UnitType/-/php-unittype-class-examples.html">UnitType</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/watoki.curir.cookie/CookieStore/-/php-cookiestore-class-examples.html">CookieStore</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/-/tep_show_sections_tree/php-tep_show_sections_tree-function-examples.html">tep_show_sections_tree</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/ListParameterManipulation/-/php-listparametermanipulation-class-examples.html">ListParameterManipulation</a> </div> </figure> </div> </div> <div class="main-content"> <div class="addthis_inline_share_toolbox_o6yp"></div> <div id="ezoic-pub-ad-placeholder-106"> </div> <div class="example-item" id="0xa6a92b60fb7eab4d1cc70278ab6ca99605ea7a5fdc4811a543ca3dd71e886e86-248,,271,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #1</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_1" data-hash="0xa6a92b60fb7eab4d1cc70278ab6ca99605ea7a5fdc4811a543ca3dd71e886e86" data-area="248,,271,"> <div class="rating-amount">0</div> <a title="Mark this example as good" 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="Mark this example as bad" 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="Direct link to this example" href="https://hotexamples.com/examples/-/xml/label/php-xml-label-method-examples.html#0xa6a92b60fb7eab4d1cc70278ab6ca99605ea7a5fdc4811a543ca3dd71e886e86-248,,271,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xa6a92b60fb7eab4d1cc70278ab6ca99605ea7a5fdc4811a543ca3dd71e886e86&fullName=includes%2FLogEventsList.php&project=claudinec%2Fgalan-wiki')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fclaudinec%2Fgalan-wiki%2Fblob%2Fmaster%2Fincludes%2FLogEventsList.php">LogEventsList.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fclaudinec%2Fgalan-wiki">claudinec/galan-wiki</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="1"> <pre class="line-numbers language-php" data-end="271" data-start="249" data-highlight="262"> /** * Drop down menu for selection of actions that can be used to filter the log * @param array $types * @param string $action * @return string * @since 1.27 */ private function getActionSelector($types, $action) { if ($this->allowedActions === null || !count($this->allowedActions)) { return ''; } $html = ''; $html .= xml::label(wfMessage('log-action-filter-' . $types[0])->text(), 'action-filter-' . $types[0]) . "\n"; $select = new XmlSelect('subtype'); $select->addOption(wfMessage('log-action-filter-all')->text(), ''); foreach ($this->allowedActions as $value) { $msgKey = 'log-action-filter-' . $types[0] . '-' . $value; $select->addOption(wfMessage($msgKey)->text(), $value); } $select->setDefault($action); $html .= $select->getHtml(); return $html; }</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="0x5a9c5cb5e56ffd5b18f81d79485866753ac9205926a845ad49c34a413ae0da2e-78,,175,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #2</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_2" data-hash="0x5a9c5cb5e56ffd5b18f81d79485866753ac9205926a845ad49c34a413ae0da2e" data-area="78,,175,"> <div class="rating-amount">0</div> <a title="Mark this example as good" 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="Mark this example as bad" 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="Direct link to this example" href="https://hotexamples.com/examples/-/xml/label/php-xml-label-method-examples.html#0x5a9c5cb5e56ffd5b18f81d79485866753ac9205926a845ad49c34a413ae0da2e-78,,175,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0x5a9c5cb5e56ffd5b18f81d79485866753ac9205926a845ad49c34a413ae0da2e&fullName=FlaggedRevs%2Ffrontend%2Fspecialpages%2FStabilization_body.php&project=realsoc%2Fmediawiki-extensions')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions%2Fblob%2Fmaster%2FFlaggedRevs%2Ffrontend%2Fspecialpages%2FStabilization_body.php">Stabilization_body.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions">realsoc/mediawiki-extensions</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="2"> <pre class="line-numbers language-php" data-end="175" data-start="79" data-highlight="152"> public function showForm($err = null) { $out = $this->getOutput(); $form = $this->form; // convenience $title = $this->form->getPage(); $oldConfig = $form->getOldConfig(); $s = ''; // form HTML string # Add any error messages if ("" != $err) { $out->setSubtitle(wfMsgHtml('formerror')); $out->addHTML("<p class='error'>{$err}</p>\n"); } # Add header text if (!$form->isAllowed()) { $s .= wfMsgExt('stabilization-perm', 'parse', $title->getPrefixedText()); } else { $s .= wfMsgExt('stabilization-text', 'parse', $title->getPrefixedText()); } # Borrow some protection messages for dropdowns $reasonDropDown = Xml::listDropDown('wpReasonSelection', wfMsgForContent('protect-dropdown'), wfMsgForContent('protect-otherreason-op'), $form->getReasonSelection(), 'mwStabilize-reason', 4); $scExpiryOptions = wfMsgForContent('protect-expiry-options'); $showProtectOptions = $scExpiryOptions !== '-' && $form->isAllowed(); $dropdownOptions = array(); // array of <label,value> # Add the current expiry as a dropdown option if ($oldConfig['expiry'] && $oldConfig['expiry'] != Block::infinity()) { $timestamp = $this->getLang()->timeanddate($oldConfig['expiry']); $d = $this->getLang()->date($oldConfig['expiry']); $t = $this->getLang()->time($oldConfig['expiry']); $dropdownOptions[] = array(wfMsg('protect-existing-expiry', $timestamp, $d, $t), 'existing'); } # Add "other time" expiry dropdown option $dropdownOptions[] = array(wfMsg('protect-othertime-op'), 'othertime'); # Add custom expiry dropdown options (from MediaWiki message) foreach (explode(',', $scExpiryOptions) as $option) { if (strpos($option, ":") === false) { $show = $value = $option; } else { list($show, $value) = explode(":", $option); } $dropdownOptions[] = array($show, $value); } # Actually build the options HTML... $expiryFormOptions = ''; foreach ($dropdownOptions as $option) { $show = htmlspecialchars($option[0]); $value = htmlspecialchars($option[1]); $expiryFormOptions .= Xml::option($show, $value, $form->getExpirySelection() === $value) . "\n"; } # Build up the form... $s .= Xml::openElement('form', array('name' => 'stabilization', 'action' => $this->getTitle()->getLocalUrl(), 'method' => 'post')); # Add stable version override and selection options $s .= Xml::fieldset(wfMsg('stabilization-def'), false) . "\n" . Xml::radioLabel(wfMsg('stabilization-def1'), 'wpStableconfig-override', 1, 'default-stable', 1 == $form->getOverride(), $this->disabledAttr()) . '<br />' . "\n" . Xml::radioLabel(wfMsg('stabilization-def2'), 'wpStableconfig-override', 0, 'default-current', 0 == $form->getOverride(), $this->disabledAttr()) . "\n" . Xml::closeElement('fieldset'); # Add autoreview restriction select $s .= Xml::fieldset(wfMsg('stabilization-restrict'), false) . $this->buildSelector($form->getAutoreview()) . Xml::closeElement('fieldset') . Xml::fieldset(wfMsg('stabilization-leg'), false) . Xml::openElement('table'); # Add expiry dropdown to form... if ($showProtectOptions && $form->isAllowed()) { $s .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td class='mw-label'>" . Xml::label(wfMsg('stabilization-expiry'), 'mwStabilizeExpirySelection') . "</td>\n\t\t\t\t\t<td class='mw-input'>" . Xml::tags('select', array('id' => 'mwStabilizeExpirySelection', 'name' => 'wpExpirySelection', 'onchange' => 'onFRChangeExpiryDropdown()') + $this->disabledAttr(), $expiryFormOptions) . "</td>\n\t\t\t\t</tr>"; } # Add custom expiry field to form... $attribs = array('id' => "mwStabilizeExpiryOther", 'onkeyup' => 'onFRChangeExpiryField()') + $this->disabledAttr(); $s .= "\n\t\t\t<tr>\n\t\t\t\t<td class='mw-label'>" . Xml::label(wfMsg('stabilization-othertime'), 'mwStabilizeExpiryOther') . '</td> <td class="mw-input">' . Xml::input("mwStabilize-expiry", 50, $form->getExpiryCustom(), $attribs) . '</td> </tr>'; # Add comment input and submit button if ($form->isAllowed()) { $watchLabel = wfMsgExt('watchthis', 'parseinline'); $watchAttribs = array('accesskey' => wfMsg('accesskey-watch'), 'id' => 'wpWatchthis'); $watchChecked = $this->getUser()->getOption('watchdefault') || $title->userIsWatching(); $reviewLabel = wfMsgExt('stabilization-review', 'parseinline'); $s .= ' <tr> <td class="mw-label">' . xml::label(wfMsg('stabilization-comment'), 'wpReasonSelection') . '</td> <td class="mw-input">' . $reasonDropDown . '</td> </tr> <tr> <td class="mw-label">' . Xml::label(wfMsg('stabilization-otherreason'), 'wpReason') . '</td> <td class="mw-input">' . Xml::input('wpReason', 70, $form->getReasonExtra(), array('id' => 'wpReason', 'maxlength' => 255)) . '</td> </tr> <tr> <td></td> <td class="mw-input">' . Xml::check('wpReviewthis', $form->getReviewThis(), array('id' => 'wpReviewthis')) . "<label for='wpReviewthis'>{$reviewLabel}</label>" . '&#160;&#160;&#160;&#160;&#160;' . Xml::check('wpWatchthis', $watchChecked, $watchAttribs) . "&#160;<label for='wpWatchthis' " . Xml::expandAttributes(array('title' => Linker::titleAttrib('watch', 'withaccess'))) . ">{$watchLabel}</label>" . '</td> </tr> <tr> <td></td> <td class="mw-submit">' . Xml::submitButton(wfMsg('stabilization-submit')) . '</td> </tr>' . Xml::closeElement('table') . Html::hidden('title', $this->getTitle()->getPrefixedDBKey()) . Html::hidden('page', $title->getPrefixedText()) . Html::hidden('wpEditToken', $this->getUser()->editToken()); } else { $s .= Xml::closeElement('table'); } $s .= Xml::closeElement('fieldset') . Xml::closeElement('form'); $out->addHTML($s); $out->addHTML(Xml::element('h2', null, htmlspecialchars(LogPage::logName('stable')))); LogEventsList::showLogExtract($out, 'stable', $title->getPrefixedText(), '', array('lim' => 25)); # Add some javascript for expiry dropdowns $out->addScript("<script type=\"text/javascript\">\n\t\t\t\tfunction onFRChangeExpiryDropdown() {\n\t\t\t\t\tdocument.getElementById('mwStabilizeExpiryOther').value = '';\n\t\t\t\t}\n\t\t\t\tfunction onFRChangeExpiryField() {\n\t\t\t\t\tdocument.getElementById('mwStabilizeExpirySelection').value = 'othertime';\n\t\t\t\t}\n\t\t\t</script>"); }</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/site/trends?type=php%7Cf">Top Functions</a> | <a href="https://hotexamples.com/site/trends?type=php%7Cc"> Top Classes </a> | <a href="https://doc.hotexamples.com/doc/map">Documentation</a> | <a href="/site/privacy">Privacy Policy</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/">PHP</a> | <a href="https://csharp.hotexamples.com/">C# (CSharp)</a> | <a href="https://java.hotexamples.com/">Java</a> | <a href="https://golang.hotexamples.com/">Golang</a> | <a href="https://cpp.hotexamples.com/">C++ (Cpp)</a> | <a href="https://python.hotexamples.com/">Python</a> | <a href="https://javascript.hotexamples.com/">JavaScript</a> | <a href="https://typescript.hotexamples.com/">TypeScript</a> </div> </div> <div class="row"> <div class="col-md-12" style="text-align: center"> <a href="https://hotexamples.com/examples/-/xml/label/php-xml-label-method-examples.html">EN</a> | <a href="https://hotexamples.com/ru/examples/-/xml/label/php-xml-label-method-examples.html">RU</a> | <a href="https://hotexamples.com/de/examples/-/xml/label/php-xml-label-method-examples.html">DE</a> | <a href="https://hotexamples.com/fr/examples/-/xml/label/php-xml-label-method-examples.html">FR</a> | <a href="https://hotexamples.com/es/examples/-/xml/label/php-xml-label-method-examples.html">ES</a> | <a href="https://hotexamples.com/pt/examples/-/xml/label/php-xml-label-method-examples.html">PT</a> | <a href="https://hotexamples.com/it/examples/-/xml/label/php-xml-label-method-examples.html">IT</a> | <a href="https://hotexamples.com/jp/examples/-/xml/label/php-xml-label-method-examples.html">JP</a> | <a href="https://hotexamples.com/zh/examples/-/xml/label/php-xml-label-method-examples.html">ZH</a> | <a href="https://hotexamples.com/ko/examples/-/xml/label/php-xml-label-method-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>