Esempio n. 1
0
 /**
  * Fills member elementPropertyValues member with property values.
  *
  * @param integer $iblockId Information block identifier.
  * @param array[string]string $elementFilter Element property values criteria.
  *
  * @return void
  */
 protected function loadElementProperties($iblockId, array $elementFilter)
 {
     $elementList = \CIBlockElement::getPropertyValues($iblockId, $elementFilter);
     while ($element = $elementList->fetch()) {
         foreach ($element as $propertyId => $value) {
             if ($value !== false) {
                 if (!isset($this->elementPropertyValues[$propertyId])) {
                     $this->elementPropertyValues[$propertyId] = array();
                 }
                 if (is_array($value)) {
                     $this->elementPropertyValues[$propertyId] += $value;
                 } else {
                     $this->elementPropertyValues[$propertyId][] = $value;
                 }
             }
         }
     }
 }