CONTENIDO HTML generation
CONTENIDO provides the feature to build html code in your php script with the use of objects. So it is possible to generate valid markup without writing the code by yourself.
The big advantage of such a central functionality is that the changes at one place effect all other usages, for example to set a default attribut in the whole CONTENIDO markup. Because of these potential it is highly recommended to use the cHTML classes to build your html code.
The automatic generation of id attributes makes it easier to select your elements with css or js.
cHTMLFormElement
, cHTMLContentElement, cHTMLIframe and cHTMLImage.cHTMLFormElement
The cHTMLFormElement class represents a form element. All the inheritanced classes are logically grouped by the form context.
Specified elements:
Class | Description | HTML element | |||
---|---|---|---|---|---|
The cHTMLButton class represents a button. | <button></button> | cHTMLSelectElement | cHTMLSelectElement|||
cHTMLCheckbox | cHTMLCheckbox class represents a checkbox. | <input type="checkbox" /> | |||
cHTMLHiddenField | cHTMLHiddenField class represents a | select elementhidden form field. | <select></select><input type="hidden" /> | ||
cHTMLOptionElement | cHTMLOptionElement class represents a select option element. | <option></option> | |||
cHTMLPasswordbox | cHTMLPasswordbox class represents a password form field. | <input type="password" /> | |||
cHTMLHiddenFieldcHTMLRadiobutton | cHTMLHiddenField cHTMLRadiobutton class represents a hidden form fieldradio button. | <input type="hiddenradio" /> | |||
cHTMLUploadcHTMLSelectElement | cHTMLUpload cHTMLSelectElement class represents a file upload select element. | <input type="file" /><select></select> | |||
cHTMLTextarea | cHTMLTextarea class represents a textarea. | <textarea></textarea> | |||
cHTMLRadiobuttoncHTMLTextbox | cHTMLRadiobutton cHTMLTextbox class represents a radio buttontextbox. | <input type="radiotext" /> | |||
cHTMLCheckboxcHTMLUpload | cHTMLCheckbox cHTMLUpload class represents a checkboxfile upload element. | <input type="checkbox" /> | cHTMLTextbox | cHTMLTextbox class represents a textbox. | <input type="text"file" /> |
cHTMLContentElement
The cHTMLContentElement class represents a content element.
cHTMLCanvas | Description | HTML element | cHTMLOptgroup | cHTMLOptgroup | cHTMLCanvas class can be used for creating | optgropsgraphics. | <optgroup><<canvas></optgroup> canvas> | |
---|---|---|---|---|---|---|---|---|
cHTMLDiv | cHTMLFieldset | cHTMLDiv class represents a | fieldsetdiv element. | <fieldset><<div></fieldset> div> | ||||
cHTMLFieldset | cHTMLTableHead | cHTMLFieldset class represents a | table headfieldset element. | <th><<fieldset></th> fieldset> | ||||
cHTMLSectioncHTMLFooter | cHTMLSection HTMLFooter class represents a section within an articlefooter. | <section><<footer></section> footer> | ||||||
cHTMLListItemcHTMLForm | cHTMLListItem cHTMLForm class represents a list itemform. | <li><<form></li> form> | ||||||
cHTMLTableBodycHTMLHeader | cHTMLTableBody cHTMLHeader class represents a table bodyheader. | <table><<header></table> header> | ||||||
cHTMLTimecHTMLHgroup | cHTMLTime cHTMLHgroup class represents a date/timeset of related headlines. | <time><<hgroup></time> hgroup> | ||||||
cHTMLNavcHTMLLabel | cHTMLNav cHTMLLabel class represents a navigationform label. | <nav><<label></nav> label> | ||||||
cHTMLFormcHTMLLegend | cHTMLForm cHTMLLegend class represents a formlegend element. | <form><<legend></form> legend> | ||||||
cHTMLCanvascHTMLLink | cHTMLCanvas class can be used for creating graphicscHTMLLink class represents a link. | <canvas><<a></canvas> a> | ||||||
cHTMLList | cHTMLList class represents a list. | <ul></ul>, <ol></ol> | ||||||
cHTMLTableDatacHTMLListItem | cHTMLTableData cHTMLListItem class represents a table datelist item. | <td><<li></td> li> | ||||||
cHTMLArticlecHTMLNav | cHTMLArticle cHTMLNav class represents an HTML5 article element. | <article></article> | ||||||
cHTMLSpan | cHTMLSpan class represents a span element. | <span></span> | ||||||
cHTMLAsidea navigation. | <nav></nav> | |||||||
cHTMLOptgroup | cHTMLAside class represents content which is related to the surrounding content. | <aside><aside> | ||||||
cHTMLLabel | cHTMLLabel class represents a form label. | <label></label> | ||||||
cHTMLLink | cHTMLLink class represents a link. | <a></a> | ||||||
cHTMLLegend | cHTMLLegend class represents a legend element. | <legend></legend> | ||||||
cHTMLOptgroup class can be used for creating optgrops. | <optgroup></optgroup> | |||||||
cHTMLParagraph | cHTMLParagraph class represents a paragraph. | <p></p> | ||||||
cHTMLScript | cHTMLScript class represents a script. | <script></script> | ||||||
cHTMLParagraphcHTMLSection | cHTMLParagraph cHTMLSection class represents a paragraphsection within an article. | <p><<section></p> section> | ||||||
cHTMLHeadercHTMLSpan | cHTMLHeader cHTMLSpan class represents a headerspan element. | <header><<span></header> span> | ||||||
cHTMLFootercHTMLTable | HTMLFooter cHTMLTable class represents a footertable. | <footer><<table></footer> table> | ||||||
cHTMLHgroupcHTMLTableBody | cHTMLHgroup cHTMLTableBody class represents a set of related headlinestable body. | <hgroup><<tbody></hgroup> tbody> | ||||||
cHTMLDivcHTMLTableData | cHTMLDiv cHTMLTableData class represents a div elementtable date. | <div><<td></div> td> cHTMLTableRow | ||||||
cHTMLTableHeader | cHTMLTableRow | cHTMLTableHead class represents a table | rowhead. | <tr><<th></tr> th> | ||||
cHTMLVideocHTMLTime | cHTMLVideo cHTMLTime class represents a video. | <video></video> | ||||||
cHTMLAudio | cHTMLAudio class specifies sound content. | <audio></audio> | ||||||
cHTMLTabledate/time. | <time></time> | |||||||
cHTMLVideo | cHTMLTable cHTMLVideo class represents a tablevideo. | <table><<video></table> video> |
cHTMLIFrame
The cHTMLIFrame class represents an iframe.
Method | Description |
---|---|
setSrc(string $src) | This method sets the source of the iframe. |
setWidth(string $width) | This method sets the width of the iframe. |
setHeight(string $height) | This method sets the height of the iframe. |
setBorder(string $border) | This method sets the border of the iframe. |
cHTMLImage
The cHTMLImage class represents an image.
Method | Description |
---|---|
setSrc(string $src) | This method sets the source of the image. |
setWidth(string $width) | This method sets the width of the image. |
setHeight(string $height) | This method sets the height of the image. |
setBorder(string $border) | This method sets the border of the image. |