Extract Nodes list for translations in an item in this node.
@param CNabuDataObject $item Item of which will extract the nodes.
@return array Returns an array of found nodes or null when they are not available nodes.
177638
protected function extractNodes(CNabuDataObject $item)
    {
        $retval = null;

        if ($item instanceof INabuTranslated) {
            if ($item->hasTranslations()) {
                $nodes = array();
                $main_index_name = $this->list->getIndexedFieldName();
                $item->getTranslations()->iterate(
                    function ($key, $translation) use (&$nodes, $main_index_name, $item) {
                        if (($translation->isValueNumeric($main_index_name) ||
                             $translation->isValueGUID($main_index_name)
                            ) &&
                            ($translation->isValueString($this->key_field) ||
                             $translation->isValueNumeric($this->key_field)
                            )
                        ) {
                            $key = $translation->getValue($this->key_field);
                            $nodes[$key] = array(
                                'key' => $key,
                                'pointer' => $translation->getValue($main_index_name)
                            );
                            if ($translation->isValueNumeric($this->order_field) ||
                                $translation->isValueString($this->order_field)
                            ) {
                                $nodes[$key]['order'] = $translation->getValue($this->order_field);
                            } elseif ($item->isValueNumeric($this->order_field) ||
                                $item->isValueString($this->order_field)
                            ) {
                                $nodes[$key]['order'] = $item->getValue($this->order_field);
                            }
                        }
                    }
                );
                if (count($nodes) > 0) {
                    $retval = $nodes;
                }
            }
        } else {
            throw new ENabuCoreException(
                ENabuCoreException::ERROR_UNEXPECTED_PARAM_CLASS_TYPE,
                array('$item', get_class($item))
            );
        }

        return $retval;
    }
25118
protected function indexItem(CNabuDataObject $item)
    {
        if (is_array($this->secondary_indexes)) {
            foreach ($this->secondary_indexes as $index) {
                $index->addItem($item);
            }
        }
    }
57190
public function getRowUrl($item)
    {
        if (!$item instanceof Varien_Object) {
            return parent::getRowUrl($item);
        }

        $rowUrlRoute = trim($this->getRowUrlRoute());
        if (empty($rowUrlRoute)) {
            return parent::getRowUrl($item);
        }

        $params = [];

        $rowUrlParams = $this->getRowUrlParams();
        $rowUrlParams = (is_array($rowUrlParams) ? $rowUrlParams : explode(',', $rowUrlParams));
        $rowUrlParams = array_filter(array_map('trim', $rowUrlParams));
        foreach ($rowUrlParams as $key => $value) {
            if (strpos($value, '{{') === 0 && strrpos($value, '}}') === (strlen($value) - 2)) {
                $value = $item->getDataUsingMethod(substr($value, 2, -2));
            }

            $params[$key] = $value;
        }

        $rowUrlQueryParams = $this->getRowUrlQueryParams();
        $rowUrlQueryParams = (is_array($rowUrlQueryParams) ? $rowUrlQueryParams : explode(',', $rowUrlQueryParams));
        $rowUrlQueryParams = array_filter(array_map('trim', $rowUrlQueryParams));
        foreach ($rowUrlQueryParams as $key => $value) {
            if (strpos($value, '{{') === 0 && strrpos($value, '}}') === (strlen($value) - 2)) {
                $value = $item->getDataUsingMethod(substr($value, 1, -1));
            }
            $params['_query'][$key] = $value;
        }

        return $this->getUrl($rowUrlRoute, $params);
    }
338468
public static function GetSchemaType( $item )
	{
		if ( $nav instanceof XPath2Item )
		{
			return $item->getSchemaType();
		}

		if ( $nav instanceof XPathNavigator )
		{
			/**
			 * @var XPathNavigator $nav
			 */
			$nav = $item;
			$xmlType = $nav->getSchemaType();
			if ( is_null( $xmlType ) )
			{
				return XmlSchema::$UntypedAtomic;
			}
			return $xmlType;
		}
		return $item->getSchemaType();
	}
275481
public function parse(array $item): array
    {
        if (\count($item['fieldLayout']) > 1) {
            $errors = [
                'fieldLayout' => [
                    Architect::t('Field layout can only have 1 tab.')

                ]
            ];
            return [null, $errors];
        }

        $tagGroup = new TagGroup([
            'name' => $item['name'],
            'handle' => $item['handle'],
        ]);

        $fieldLayout = new FieldLayout();
        $fieldLayout->type = Tag::class;

        return [$tagGroup, null];
    }
1298765
private function getDataReference($item) {
    if ($this->isASleepingReference) {
      $this->referenceWake();
    }
    if ((is_a($item, '\Nymph\Entity') || is_a($item, '\SciActive\HookOverride'))
        && is_callable([$item, 'toReference'])) {
      // Convert entities to references.
      return $item->toReference();
    } elseif (is_array($item)) {
      // Recurse into lower arrays.
      return array_map([$this, 'getDataReference'], $item);
    } elseif (is_object($item)) {
      foreach ($item as &$curProperty) {
        $curProperty = $this->getDataReference($curProperty);
      }
      unset($curProperty);
    }
    // Not an entity or array, just return it.
    return $item;
  }
587031
private function getRelationships(Item $item)
    {
        if ($include_params = $this->resource->getIncludeParams()) {
            $item->setIncludeParams($include_params);

            return $item->getIncluded();
        }

        return [];
    }
1124795
public function isArray($item=null) {
    list($item) = self::_wrapArgs(func_get_args(), 1);
    return self::_wrap(is_array($item));
  }
748978
protected function extractValue($item, string $field)
    {
        if ($item instanceof Node && $item->has($field)) {
            return $item->get($field);
        }

        return null;
    }
1211054
private function getDataFromItem($item)
    {
        if (!is_object($item) && !is_array($item)) {
            return array();
        }

        return is_object($item) ? get_object_vars($item) : $item;
    }
425253
protected function _objectToRDF($item) {
    $object = new stdClass();

    if(self::_isValue($item)) {
      $object->type = 'literal';
      $value = $item->{'@value'};
      $datatype = property_exists($item, '@type') ? $item->{'@type'} : null;

      // convert to XSD datatypes as appropriate
      if(is_bool($value)) {
        $object->value = ($value ? 'true' : 'false');
        $object->datatype = $datatype ? $datatype : self::XSD_BOOLEAN;
      } else if(is_double($value) || $datatype == self::XSD_DOUBLE) {
        // canonical double representation
        $object->value = preg_replace(
          '/(\d)0*E\+?/', '$1E', sprintf('%1.15E', $value));
        $object->datatype = $datatype ? $datatype : self::XSD_DOUBLE;
      } else if(is_integer($value)) {
        $object->value = strval($value);
        $object->datatype = $datatype ? $datatype : self::XSD_INTEGER;
      } else if(property_exists($item, '@language')) {
        $object->value = $value;
        $object->datatype = $datatype ? $datatype : self::RDF_LANGSTRING;
        $object->language = $item->{'@language'};
      } else {
        $object->value = $value;
        $object->datatype = $datatype ? $datatype : self::XSD_STRING;
      }
    } else {
      // convert string/node object to RDF
      $id = is_object($item) ? $item->{'@id'} : $item;
      $object->type = (strpos($id, '_:') === 0) ? 'blank node' : 'IRI';
      $object->value = $id;
    }

    // skip relative IRIs
    if($object->type === 'IRI' && !self::_isAbsoluteIri($object->value)) {
      return null;
    }

    return $object;
  }
526018
protected function removeItemIndex(CNabuDataObject $item)
    {
        if (is_array($this->secondary_indexes)) {
            foreach ($this->secondary_indexes as $index) {
                $index->removeItem($item->getValue($this->index_field));
            }
        }
    }
985592
private function _getSiteIdsFromTree( MShop_Locale_Item_Site_Interface $item )
	{
		$list = array( $item->getId() );

		foreach( $item->getChildren() as $child ) {
			$list = array_merge( $list, $this->_getSiteIdsFromTree( $child ) );
		}

		return $list;
	}
469600
public function get_item_value($item) {
        if ($this->structure instanceof mod_feedback_completion) {
            return $this->structure->get_item_value($item);
        }
        return null;
    }
36842
public function findRelatedItems(Taggable $item, $class, $locale, $nbOfItems = 1)
    {
        $instance = new $class();
        if (!($instance instanceof Taggable)) {
            return null;
        }

        $em = $this->em;
        $rsm = new ResultSetMappingBuilder($em);
        $rsm->addRootEntityFromClassMetadata($class, 'i');

        $meta = $em->getClassMetadata($class);
        $tableName = $meta->getTableName();

        $escapedClass = str_replace('\\', '\\\\', $class);

        $query = <<<EOD
            SELECT i.*, COUNT(i.id) as number
            FROM {$tableName} i
            LEFT JOIN kuma_taggings t
            ON t.resource_id = i.id
            AND t.resource_type = '{$instance->getTaggableType()}'
            WHERE t.tag_id IN (
                SELECT tg.tag_id
                FROM kuma_taggings tg
                WHERE tg.resource_id = {$item->getId()}
                AND tg.resource_type = '{$item->getTaggableType()}'
            )
            AND i.id <> {$item->getId()}
EOD;

        if ($item instanceof AbstractPage) {
            $query .= <<< EOD
                AND i.id IN (
                    SELECT nodeversion.refId
                    FROM kuma_nodes as node
                    INNER JOIN kuma_node_translations as nodetranslation
                    ON node.id = nodetranslation.node
                    AND nodetranslation.lang = '{$locale}'
                    INNER JOIN kuma_node_versions as nodeversion
                    ON nodetranslation.publicNodeVersion = nodeversion.id
                    AND nodeversion.refEntityname = '{$escapedClass}'
                    AND node.deleted = 0
                    AND nodetranslation.online = 1
                )
EOD;
        }

        $query .= <<<EOD
            GROUP BY
                i.id
            HAVING
                number > 0
            ORDER BY
                number DESC
            LIMIT {$nbOfItems};
EOD;

        $items = $em->createNativeQuery($query, $rsm)->getResult();

        return $items;
    }
306141
private function getContainerServices($item)
    {
        if (false === is_string($item)) {
            return $item;
        }

        $matches = array();
        if (preg_match('/^@([a-z0-9.-]+)$/i', trim($item), $matches)) {
            if ($this->has($matches[1])) {
                return $this->get($matches[1]);
            }
        }

        return $item;
    }
56026
private function getTags($item)
    {
        if ($item instanceof PoolInterface) {
            return $this->getPoolTags($item);
        }
        return $this->getRunTags($item);
    }