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.
At the first inheritance level are the classes cHTMLFormElement, cHTMLContentElement, cHTMLIframe and cHTMLImage.
cHTMLFormElement
The cHTMLFormElement class represents a form element.
Specified elements:
Class | Description | HTML element |
---|---|---|
The cHTMLButton class represents a button. | <button></button> | |
cHTMLCheckbox | cHTMLCheckbox class represents a checkbox. | <input type="checkbox" /> |
cHTMLHiddenField | cHTMLHiddenField class represents a hidden form field. | <input type="hidden" /> |
cHTMLOptionElement | cHTMLOptionElement class represents a select option element. | <option></option> |
cHTMLPasswordbox | cHTMLPasswordbox class represents a password form field. | <input type="password" /> |
cHTMLRadiobutton | cHTMLRadiobutton class represents a radio button. | <input type="radio" /> |
cHTMLSelectElement | cHTMLSelectElement class represents a select element. | <select></select> |
cHTMLTextarea | cHTMLTextarea class represents a textarea. | <textarea></textarea> |
cHTMLTextbox | cHTMLTextbox class represents a textbox. | <input type="text" /> |
cHTMLUpload | cHTMLUpload class represents a file upload element. | <input type="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 elementa navigation. | <article><<nav></article>nav> | ||||||
cHTMLSpancHTMLOptgroup | cHTMLSpan class represents a span elementcHTMLOptgroup class can be used for creating optgrops. | <span><<optgroup></span>optgroup> | ||||||
cHTMLAsidecHTMLParagraph | cHTMLAside cHTMLParagraph class represents content which is related to the surrounding contenta paragraph. | <aside><aside><p></p> | ||||||
cHTMLLabelcHTMLScript | cHTMLLabel cHTMLScript class represents a form labelscript. | <label><<script></label>script> | ||||||
cHTMLLinkcHTMLSection | cHTMLLink cHTMLSection class represents a linksection within an article. | <a><<section></a>section> | ||||||
cHTMLLegendcHTMLSpan | cHTMLLegend cHTMLSpan class represents a legend span element. | <legend><<span></legend>span> | ||||||
cHTMLScriptcHTMLTable | cHTMLScript cHTMLTable class represents a scripttable. | <script><<table></script>table> | ||||||
cHTMLParagraphcHTMLTableBody | cHTMLParagraph cHTMLTableBody class represents a paragraphtable body. | <p><<table></p>table> | ||||||
cHTMLHeadercHTMLTableData | cHTMLHeader cHTMLTableData class represents a headertable date. | <header><<td></header>td>cHTMLFooter | ||||||
cHTMLTableHeader | HTMLFooter | cHTMLTableHead class represents a | footertable head. | <footer>< <th></ footer>th> | ||||
cHTMLHgroupcHTMLTime | cHTMLHgroup cHTMLTime class represents a set of related headlinesdate/time. | <hgroup><<time></hgroup>time> | ||||||
cHTMLDivcHTMLTime | cHTMLDiv cHTMLTime class represents a div element. | <div></div> | cHTMLTableRow | cHTMLTableRow class represents a table row. | <tr></tr>date/time. | <time></time> | ||
cHTMLVideo | cHTMLVideo class represents a video. | <video></video> | ||||||
cHTMLAudio | cHTMLAudio class specifies sound content. | <audio></audio> | ||||||
cHTMLTable | cHTMLTable class represents a table. | <table></table> |
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. |