/** * @return BBCode; */ public function nbbc() { if ($this->_NBBC === null) { $plugin = new BBCode(); $this->_NBBC = $plugin->nbbc(); $this->_NBBC->setIgnoreNewlines(true); $this->_NBBC->addRule('attachment', array('mode' => Nbbc\BBCode::BBCODE_MODE_CALLBACK, 'method' => array($this, "DoAttachment"), 'class' => 'image', 'allow_in' => array('listitem', 'block', 'columns', 'inline', 'link'), 'end_tag' => Nbbc\BBCode::BBCODE_PROHIBIT, 'content' => Nbbc\BBCode::BBCODE_PROHIBIT, 'plain_start' => "[image]", 'plain_content' => array())); } return $this->_NBBC; }