/** * Returns eZXML content to insert into XML blocks (ezxmltext datatype) * eZXML is generated from HTML content provided as argument * @param string $htmlContent Input HTML string * @return string Generated eZXML string */ public static function getRichContent($htmlContent) { $htmlParser = new SQLIXMLInputParser(); $htmlParser->setParseLineBreaks(true); $document = $htmlParser->process($htmlContent); $richContent = eZXMLTextType::domString($document); return $richContent; }
/** * Check if a custom tag is enabled * * @param string $name * @return bool */ public static function customTagIsEnabled($name) { if (self::$customTagList === null) { $ini = eZINI::instance('content.ini'); self::$customTagList = $ini->variable('CustomTagSettings', 'AvailableCustomTags'); } return in_array($name, self::$customTagList); }