/** * Create a new external content item. * * @param mixed $source * The contentSource object this item was laoded through * @param mixed $id * The ID of the item in the remote system * @param mixed $content * A raw representation of the remote item. This allows for * some systems loading up entire representations when you make * a call to 'getChildren', for example. */ public function __construct($source = null, $id = null) { parent::__construct(); if ($source) { $this->source = $source; $this->externalId = $id; // if we are here, then we have been created in context of a parent, which also // means there's a compound ID, so lets get that $this->ID = $this->source->ID . ExternalContent::ID_SEPARATOR . $this->source->encodeId($id); $this->ShowInMenus = $this->source->ShowContentInMenu; $this->init(); } }