/** * Sets the keywords for the XML document. This gets added under the root. * Expects a keywords entry in the block * @param \System\Cache\PageCache\Block The block with the keywords entry * @return \SimpleXMLElement The XML tree */ public function outputKeywordsXML(\System\Cache\PageCache\Block $block) { $xml = \System\XML\XML::createXMLRoot(); $xml->keywords = \System\Security\Sanitize::sanitizeString((string) $block->keywords, false, false, true, true, false, false); return $xml; }
/** * This function can be used to mimic the behaviour of a constructor. * Override this function and apply your own functionality. * By overriding this function, we are able to define a general layout construction. * This function always gets called. * @param \System\Cache\PageCache\Block The block to base the page on. * @return \SimpleXMLElement The XML block to merge into the root */ public function setup(\System\Cache\PageCache\Block $block) { $xml = \System\XML\XML::createXMLRoot(); return $xml; }