Skip to content

Commit

Permalink
feature/WKS-367: Parse the "externalid" page property
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrv committed Oct 3, 2018
1 parent 5fcd9bd commit afb8110
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion lib/CultureFeed/Cdb/Item/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ class CultureFeed_Cdb_Item_Page implements CultureFeed_Cdb_IElement
protected $tagline;

/**
* The external Id of the page.
*
* @var string
*/
protected $externalId;


/**
* Get the id of this page.
* @return string
*/
Expand Down Expand Up @@ -386,7 +394,27 @@ public function setTagline($tagline)
$this->tagline = $tagline;
}


/**
* Set the external id of this page.
* @param string $externalId
*/
public function setExternalId($externalId)
{
$this->externalId = $externalId;
}

/**
* Get the external id of this page.
* @return string
*/
public function getExternalId()
{
return $this->externalId;
}


/**
* @see CultureFeed_Cdb_IElement::appendToDOM()
*/
public function appendToDOM(DOMElement $element)
Expand Down Expand Up @@ -545,6 +573,9 @@ public static function parseFromCdbXml(SimpleXMLElement $xmlElement)
// Set tagline.
$page->setTagline((string) $xmlElement->tagline);

return $page;
// Set external id.
$page->setExternalId((string) $xmlElement->externalid);

return $page;
}
}

0 comments on commit afb8110

Please sign in to comment.