mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-11-16 12:35:31 +00:00
2085bc69a7
This reverts commit b369971b4cc0d219803eb94382f02f154ac430a6.
25 lines
579 B
PHP
25 lines
579 B
PHP
<?php
|
|
namespace Wikia\PortableInfobox\Parser\Nodes;
|
|
|
|
use Wikia\PortableInfobox\Parser\XmlParser;
|
|
|
|
class NodeSet extends Node {
|
|
|
|
public function getData() {
|
|
$nodeFactory = new XmlParser( $this->infoboxData );
|
|
if ( $this->externalParser ) {
|
|
$nodeFactory->setExternalParser( $this->externalParser );
|
|
}
|
|
return [ 'value' => $nodeFactory->getDataFromNodes( $this->xmlNode ) ];
|
|
}
|
|
|
|
public function isEmpty( $data ) {
|
|
foreach ( $data[ 'value' ] as $elem ) {
|
|
if ( $elem[ 'type' ] != 'header' && !( $elem[ 'isEmpty' ] ) ) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
}
|