/**
  *
  * @return Array
  */
 function getSource()
 {
     $source = parent::getSource();
     //debug::log("original source count ".implode($this->classNamesForItems)." ".$this->siteTreeParentID.": ".count($source));
     if ($this->siteTreeParentID) {
         $arrayItems = array();
         $allChildrenForSiteTreeParent = $this->getAllChildrenForSiteTreeParent($this->siteTreeParentID);
         //debug::log("new source count: ".count($allChildrenForSiteTreeParent));
         $finalSource = array();
         foreach ($source as $sourceKey => $sourceValue) {
             if (isset($allChildrenForSiteTreeParent[$sourceKey])) {
                 $finalSource[$sourceKey] = $sourceValue;
             }
         }
     } else {
         $finalSource = $source;
     }
     //debug::log("final source count: ".count($finalSource));
     return $finalSource;
 }
コード例 #2
0
 public function getSource()
 {
     $source = parent::getSource();
     if ($this->tags) {
         $values = array_values($source);
         $source = array_combine($values, $values);
     }
     return $source;
 }