public function getFormattedContent() { $this->formattedContent = WCF::getLanguage()->getDynamicVariable('wcf.sketchbook.sketchContents.' . SketchbookUtil::nameToLangVar($this->name)); EventHandler::fireAction($this, 'shouldParseMessage'); MessageParser::getInstance()->setOutputType('text/html'); $this->formattedContent = MessageParser::getInstance()->parse($this->formattedContent, $this->enableSmilies, $this->enableHTML, $this->enableBBCodes); EventHandler::fireAction($this, 'didParseMessage'); return $this->formattedContent; }
public static function getParentsByName($name) { if (!isset(self::$parentsCache[$name])) { self::$parentsCache = array(); $parts = explode('/', $name); $count = count($parts); if ($count > 1) { for ($i = 1; $i <= $count; $i++) { self::$parentsCache[] = implode('/', array_slice($parts, 0, $i)); } } } return self::$parentsCache[$name]; }