private function doResolveAntecedentHierarchyRecursively(DIWikiPage $subject, array $propertySearchPattern, RequestOptions $requestOptions, $currentDepth = 0)
 {
     $dataItem = null;
     if ($propertySearchPattern === array()) {
         return null;
     }
     $property = array_shift($propertySearchPattern);
     $propertyValues = $this->store->getPropertyValues($subject, DIProperty::newFromUserLabel($property), $requestOptions);
     if ($propertyValues === array()) {
         return null;
     }
     foreach ($propertyValues as $value) {
         if (!$value instanceof DIWikiPage || $subject->equals($value)) {
             continue;
         }
         // A flat display can only display one parent in its hierarchy
         $dataItem = $value;
         break;
     }
     if ($dataItem === null) {
         return null;
     }
     $this->antecedentHierarchyLinks[] = $dataItem;
     $currentDepth++;
     return $this->doResolveAntecedentHierarchyRecursively($dataItem, $propertySearchPattern, $requestOptions, $currentDepth);
 }
Esempio n. 2
0
 /**
  * Compare and find changes related to conversion factor
  *
  * @since 1.9
  */
 protected function compareConversionTypedFactors()
 {
     Profiler::In(__METHOD__, true);
     $pconversion = new DIProperty(DIProperty::TYPE_CONVERSION);
     $newfactors = $this->semanticData->getPropertyValues($pconversion);
     $oldfactors = $this->store->getPropertyValues($this->semanticData->getSubject(), $pconversion);
     $this->notifyUpdateDispatcher(!$this->isEqual($oldfactors, $newfactors));
     Profiler::Out(__METHOD__, true);
 }