function getSource() { if (!$this->source) { if ($this->useCache) { $this->source = $this->getCachedHierarchy((int) $this->parentID); } else { $this->source = $this->getHierarchy((int) $this->parentID); } } return parent::getSource(); }
function __construct($name, $title = "", $sourceClass = "SiteTree", $value = "", $labelField = "Title", $form = null, $emptyString = null, $parentID = 0) { $this->sourceClass = $sourceClass; $this->labelField = $labelField; parent::__construct($name, $title, $this->getHierarchy((int) $parentID), $value, $form, $emptyString); }