Returns an array collection of the implemented class based on parent ID.

@param int $id Parent post ID.

@return array
160045
public static function from( $id )
	{
		if ( empty( $id ) ) return;

		$output = new Collection();

		$reference = new self();

		$results = \get_children( array(
			'post_parent' => $id,
			'post_type'   => $reference->type,
			'numberposts' => -1,
			'post_status' => $reference->status
		), ARRAY_A );

		foreach ($results as $post_id => $post) {
			$model = new self();

			$output[] = $model->from_post( $post );
		}

		return $output;
	}
1318908
protected function _getMetadatas($id)
    {
        if (isset($this->_metadatasArray[$id])) {
            return $this->_metadatasArray[$id];
        } else {
            $metadatas = $this->_loadMetadatas($id);
            if (!$metadatas) {
                return false;
            }
            $this->_setMetadatas($id, $metadatas, false);
            return $metadatas;
        }
    }
122666
protected function getNodes($class, $id)
    {
        $records = [];
        $records['nodes'] = [];
        $models = $this->getNodeModels($class, $id);
        foreach ($models as $model) {
            $records['nodes'][] = $this->getNodeValues($model);
        }
        return $records;
    }
756572
public static function nodeChildren($parentId)
    {
        $parentId = intval($parentId);
        if (!static::$caching || empty(static::$_children[$parentId])) {
            $query = static::find()
                ->where(['parent_id' => $parentId])
                ->orderBy(static::$defaultOrderBy);
            $childList = $query
              //->asArray()
                ->all();
            if (static::$caching) {
                static::$_children[$parentId] = $childList;
            } else {
                return $childList;
            }
        }
        return static::$_children[$parentId];
    }
694776
protected function queryByParentId($id = null)
    {
        $id = ($id ?: $this->getKey());

        return $this->where($this->getParentIdColumn(), '=', $id);
    }
1362630
private function _getAncectors($id)
    {
        $nodes = [];
        foreach ($this->_tree as $key => $value) {
            if ($value['id'] == $id) {
                $nodes[] = $value;
                if ($value[$this->_parentSign] != 0) {
                    $nodes = array_merge($nodes, $this->_getAncectors($value[$this->_parentSign]));
                }
            }
        }
        return $nodes;
    }
643638
public function getChildren($id)
    {
        $url = $this->buildUrlByMethodName(
            'getGetChildrenUrl',
            ['id' => $id]
        );

        return $this
            ->buildLocations(
                $this->resolveApiUrl($url)
            );
    }
556192
public function lists($id = null)
    {
        if ($id !== null) {
            $this->setId($id);
        }

        return $this->getList();
    }
146736
public function previousChild($id)
    {
        $child = $this->getchild($id);
        $next  = $this->children[$child->id()]['prev'];

        return $this->getChild($next);
    }
608427
public function offsetGet($id)
    {
        $id = Str::low($id);
        if (!Arr::key($id, self::$_loaded)) {
            $className = $this->_getClassName($id);
            $this->_register($id, $className);
        }

        return parent::offsetGet($id);
    }
641820
public function getTermsTreeData($parentID = 0)
    {
        $tree = Hierarchy::getTree($this->id);

        $data = [];

        static::mapTreeDataRecursive($tree, $data, $parentID);

        return $data;
    }
624522
function instance($id): array
    {
        return collect($this->find($id))
            // Filter model attributes on actual form fields
            ->only($this->getDataKeys())
            ->all();
    }
161425
public function getTaxonomiesWithArcRoleTypeId( $id )
	{
		return array_filter( $this->importedSchemas, function( /** @var XBRL $taxonomy */ $taxonomy ) use( $id )
		{
			return $taxonomy->hasArcRoleTypeId( $id ); }
		);
	}
213059
public function getChildren($id): array
    {
        $result = [];
        $childrenIds = (array)($this->childrenIds[$id] ?? []);
        foreach ($childrenIds as $childId) {
            if ($child = $this->getItem($childId)) {
                $result[$childId] = $child;
            }
        }
        return $result;
    }
1021884
public function getImagesQueryParams(int $id): array
    {
        $json = $this->parent->performAPICallWithJsonResponse('get', '/series/'.$id.'/images/query/params');

        return DataParser::parseDataArray($json, ImageQueryParams::class);
    }
540584
private function getHierarchy(int $id): array
    {
        $arr  = [];
        $fqpn = [];

        while ($id !== 0) {
            $row = DB::table('placelocation')
                ->where('pl_id', '=', $id)
                ->first();

            $fqpn[]    = $row->pl_place;
            $row->fqpn = implode(Gedcom::PLACE_SEPARATOR, $fqpn);
            $id        = (int) $row->pl_parent_id;
            $arr[]     = $row;
        }

        return array_reverse($arr);
    }
1129473
static public function getIdParents($id = null)
    {
        $id = ($id) ? $id : self::getIdActiveMenu();
        
        $idParent = self::getMapIdParent();
        
        if (!is_array( $id ))
        {
            if (isset( $idParent[ $id ] ))
            {
                $id = array($id);
            }
            else
            {
                return array();
            }
        }
        
        if (isset( $idParent[ end( $id ) ] ))
        {
            if (isset($idParent[ $idParent[ end( $id ) ] ]))
            {
                $id[] = $idParent[ end( $id ) ];
                return self::getIdParents($id);
            }
        }        
        
        return array_reverse( $id );       
    }