2015-04-27 14:05:31 +00:00
|
|
|
<?php
|
2022-03-11 20:35:51 +00:00
|
|
|
|
2018-08-09 09:49:10 +00:00
|
|
|
namespace PortableInfobox\Parser\Nodes;
|
2015-04-27 14:05:31 +00:00
|
|
|
|
2015-07-01 14:19:31 +00:00
|
|
|
class NodeNavigation extends Node {
|
2015-04-27 14:05:31 +00:00
|
|
|
|
|
|
|
public function getData() {
|
2015-06-10 09:28:33 +00:00
|
|
|
if ( !isset( $this->data ) ) {
|
2019-02-02 22:34:48 +00:00
|
|
|
$this->data = [
|
|
|
|
'value' => $this->getInnerValue( $this->xmlNode ),
|
|
|
|
'item-name' => $this->getItemName()
|
|
|
|
];
|
2015-06-10 09:28:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return $this->data;
|
2015-04-27 14:05:31 +00:00
|
|
|
}
|
|
|
|
|
2015-06-10 09:28:33 +00:00
|
|
|
public function isEmpty() {
|
|
|
|
$data = $this->getData();
|
2018-08-16 09:25:53 +00:00
|
|
|
$links = trim( $data['value'] );
|
2015-06-10 09:28:33 +00:00
|
|
|
|
2015-05-20 14:57:43 +00:00
|
|
|
return empty( $links ) && $links != '0';
|
2015-04-27 14:05:31 +00:00
|
|
|
}
|
|
|
|
}
|