mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-15 11:59:56 +00:00
fetching infobox markup, checking if there is only one infobox
This commit is contained in:
parent
4cc019aecb
commit
5637f4d6ed
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue