fetching infobox markup, checking if there is only one infobox

This commit is contained in:
Mateusz Rybarski 2016-02-16 13:37:48 +01:00
parent 4cc019aecb
commit 5637f4d6ed
2 changed files with 17 additions and 0 deletions

View file

@ -47,6 +47,15 @@ class PortableInfoboxTemplatesHelper {
return false;
}
/**
* @param $title
* @return array of strings (infobox markups)
*/
public function getMarkup($title) {
$content = $this->fetchContent($title);
return $this->getInfoboxes($content);
}
/**
* @param $title \Title
*

View file

@ -66,6 +66,14 @@ class PortableInfoboxDataService {
return $result !== null ? $result : [ ];
}
/**
* @param $title
* @return array of strings (infobox markups)
*/
public function getInfoboxes() {
return $this->templateHelper->getMarkup($this->title);
}
/**
* Get image list from multiple infoboxes data
*