add image name to image data model

This commit is contained in:
Rafal Leszczynski 2015-05-05 12:37:47 +02:00
parent e90b441f43
commit b1f2cabf03

View file

@ -8,6 +8,7 @@ class NodeImage extends Node {
$node = []; $node = [];
$imageName = $this->getInfoboxData( $this->getXmlAttribute($this->xmlNode, self::DATA_SRC_ATTR_NAME ) ); $imageName = $this->getInfoboxData( $this->getXmlAttribute($this->xmlNode, self::DATA_SRC_ATTR_NAME ) );
$node['value'] = $this->resolveImageUrl( $imageName ); $node['value'] = $this->resolveImageUrl( $imageName );
$node['image'] = $imageName;
$node['alt'] = $this->getValueWithDefault( $this->xmlNode->{self::ALT_TAG_NAME} ); $node['alt'] = $this->getValueWithDefault( $this->xmlNode->{self::ALT_TAG_NAME} );
return $node; return $node;
} }