In the OOE approach one should never use Drupal render arrays directly, or the structures within render arrays that represent tags directly. Instead, render arrays are handled by IRender objects, which in turn can handle ITag objects, which can possibly have knowledge of - for example - the attributes and values of attributes permitted for a given XHTML/HTML5 tag.
Implementations of ITag can be created directly, but are best created via a factory, as shown. One can fetch an ITag for a specific XHTML tag parametrically by name using the newTag(name,attributes) creation method, or by known name using one of the specific creators.
© Copyright 2001 - 2016 Webel IT Australia (ABN: 67 677 268 579). All rights reserved (except as specified below).
PHP code examples from Webel IT Australia on this site are distributed under the GNU General Public License.
Excludes text and code snippets from Drupal.org quoted for educational purposes.
Drupal’s online documentation is © 2000-2014 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0.
PHP code from Drupal.org is distributed under the GNU General Public License.
Drupal® is a registered trademark of Dries Buytaert.
Text quoted from Wikipedia for educational purposes is made available under the Creative Commons Attribution-ShareAlike License.
Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
Site developed by Webel IT Australia.