/**
  * @since 1.9
  *
  * @param ArrayFormatter $params
  *
  * @return string|null
  */
 public function parse(ArrayFormatter $parameters)
 {
     $this->addDataValuesToSubobject($parameters);
     $this->parserData->getSemanticData()->addSubobject($this->subobject);
     $this->parserData->pushSemanticDataToParserOutput();
     return $this->messageFormatter->addFromArray($this->subobject->getErrors())->addFromArray($this->parserData->getErrors())->addFromArray($parameters->getErrors())->getHtml();
 }
 /**
  * @since 1.9
  *
  * @param ParserParameterProcessor $params
  *
  * @return string|null
  */
 public function parse(ParserParameterProcessor $parameters)
 {
     if ($this->parserData->canModifySemanticData() && $this->addDataValuesToSubobject($parameters) && !$this->subobject->getSemanticData()->isEmpty()) {
         $this->parserData->getSemanticData()->addSubobject($this->subobject);
     }
     $this->parserData->pushSemanticDataToParserOutput();
     $html = $this->messageFormatter->addFromArray($this->subobject->getErrors())->addFromArray($this->parserData->getErrors())->addFromArray($parameters->getErrors())->getHtml();
     // An empty output in MW forces an extra <br> element.
     //if ( $html == '' ) {
     //	$html = '<p></p>';
     //}
     return $html;
 }
Esempio n. 3
0
 /**
  * @since 1.9
  *
  * @return array
  */
 public function getErrors()
 {
     return $this->subobject->getErrors();
 }