public static boolean|string | # seekMaterialFile( string $lang, string $path, string $impl_lang = '' ) find the location of the material, from the generic path load priority: 1/ localized (using $lang) 2/ embedded (if client locale is equal to $impl_lang) 3/ default Parameters - $lang
string the language or empty string - $path
string the material path - $impl_lang
string the 'implemented' language: the language of the default materials Returns boolean|string the effective absolute path of the material |
public static boolean|array | # getCloneFromSource( string $html, DOMDocument|null $tgtdoc ) This function is used to parse an HTML sample and generate a DOM object linked to provided document, if specified This function is used to parse an HTML sample and generate a DOM object linked to provided document, if specified Parameters - $html
string input html sample (doesn't need to have the <html> tag). UTF-8 encoding expected. - $tgtdoc
DOMDocument|null target document, or null Returns boolean|array the new DOM node |
public static | # DOMsetHtml( type $node, type $html_code ) inserts html data in place of a given node inserts html data in place of a given node Parameters - $node
type $elem - $html_code
type $html_code |
public DOMNodeList | # findClassNodes( string $class ) returns the list of Nodes for given classname returns the list of Nodes for given classname Parameters Returns |
public DOMNodeList | # findAttributeNodes( string $attr ) returns the list of Nodes which have the given attribute name returns the list of Nodes which have the given attribute name Parameters - $attr
string attribute name Returns |
public DOMNodeList | # findAttributeValueNodes( string $attr, string $value ) returns the list of Nodes which have an attribute with specific value returns the list of Nodes which have an attribute with specific value Parameters - $attr
string attribute name - $value
string attribute value Returns |
public DOMNode |boolean | # findXpathNode( DOMNode |null $parentNode, string $xpath ) returns a node for the given Xpath value returns a node for the given Xpath value Parameters - $parentNode
DOMNode |null
the parent from which begin the search - $xpath
string the xpath value Returns |
public DOMNodeList |boolean | # findXpathNodes( DOMNode |null $parentNode, string $xpath ) returns the nodes for the given Xpath value returns the nodes for the given Xpath value Parameters - $parentNode
DOMNode |null
the parent from which begin the search - $xpath
string the xpath value Returns |
public DOMNode |boolean | # findCMCParentNode( ) returns false or the first node with the cmc-parent attribute returns false or the first node with the cmc-parent attribute Returns |
public NodeAttr | # peekAttribute( DOMNode $node, string $attrName ) finds an attribute in a node, and removes it finds an attribute in a node, and removes it Parameters - $node
DOMNode
the input node - $attrName
string the attribute name Returns NodeAttr the found attribute |
public | # replace( DOMNode $position, DOMNode $externalNode, mixed $bMergeAttr = false ) updates the given node with a new value, from an external document updates the given node with a new value, from an external document Parameters - $position
DOMNode
$position - $externalNode
DOMNode
$externalNode - $bMergeAttr
|
public | # setDynamic( ) tells that this material is 'dynamic', which means that content is not identical for a given query path tells that this material is 'dynamic', which means that content is not identical for a given query path |
public | |
public | # addScriptCode( string $scriptCode ) used by widgets: adds some initialization script code used by widgets: adds some initialization script code Parameters - $scriptCode
string $scriptCode |
public | # addBottomScriptCode( string $scriptcode ) used by widgets: adds some late initialization script code used by widgets: adds some late initialization script code Parameters - $scriptcode
string $scriptCode |
public | # prepDelayedJSCode( mixed $view ) |
public | # endStaticScriptCode( mixed $view ) commits the script code insertion commits the script code insertion See |
public DOMDocument | # document( ) gets direct access to the DOM document gets direct access to the DOM document Returns DOMDocument |
public string|null | # getHTML( ) get the actual HTML code Returns string|null |
public | # invalidate( ) invalidates the cached html code invalidates the cached html code |
public boolean | # ValidForSave( ) checks if html text can be extracted from this object checks if html text can be extracted from this object Returns boolean |
public | # cleanupDOM( ) cleanups the document by removing comment tags cleanups the document by removing comment tags |
public static | # load( mixed $lang, string $path, string $impl_lang = '' ) loads the material from file path, and creates a material object if success loads the material from file path, and creates a material object if success Parameters - $lang
mixed - $path
string the language or empty string - $impl_lang
string the material path |
public | # __construct( mixed $doc, mixed $physpath ) |
public | # getmtime( ) gets the modification time gets the modification time |
public | |
public | # OnSerialize( ) called before serialization. Need to convert the DOM in text because DOMDocument is not serializable called before serialization. Need to convert the DOM in text because DOMDocument is not serializable Implementation of |
public | # OnUnserialize( ) called after deserialization called after deserialization Implementation of |
public | # OnClone( mixed $srcinstance ) called after cloning the object called after cloning the object Implementation of |