mirror of
https://github.com/Universal-Omega/PortableInfobox.git
synced 2024-12-12 08:35:17 +00:00
21 lines
483 B
PHP
21 lines
483 B
PHP
<?php
|
|
namespace Wikia\PortableInfobox\Parser\Nodes;
|
|
|
|
class NodeData extends Node {
|
|
|
|
public function getData() {
|
|
if ( !isset( $this->data ) ) {
|
|
$this->data = [
|
|
'label' => $this->getInnerValue( $this->xmlNode->{self::LABEL_TAG_NAME} ),
|
|
'value' => $this->getValueWithDefault( $this->xmlNode )
|
|
];
|
|
}
|
|
|
|
return $this->data;
|
|
}
|
|
|
|
public function getSourceLabel() {
|
|
return \Sanitizer::stripAllTags( $this->getInnerValue( $this->xmlNode->{self::LABEL_TAG_NAME} ) );
|
|
}
|
|
}
|