Get All navigation where parent id, and not hidden

@param        $id
@param string $type
@param string $order
@param int    $hidden
@return mixed
427626
static public function whereParentIdORM(
        $id, $type = 'list', $order = 'list_order', $hidden = 0
    ) {
        $query = Page::query();
        if ($type != "featured") {
            $query->whereParentId($id);
        }

        switch ($type) {
            case "header":
                $query->where('is_header', 1);
                break;
            case "footer";
                $query->where('is_footer', 1);
                break;
            case "featured":
                $query->where('is_featured', 1);
                break;
            default:
                $query->where('is_header', 0);
                $query->where('is_footer', 0);
        }

        return $query->orderBy($order)->get();

        return $query->where('is_hidden', $hidden)->orderBy($order)->get();
    }
1332399
public function options(string $id_option = null, string $type = 'page'): ?array
  {
    if (
      ($id_option = $this->_get_id_option($id_option, $type)) &&
      ($os = $this->opt->options(\func_get_args()))
    ){
      $res = [];
      foreach ( $os as $o ){
        if ( $this->pref->has($o['id']) ){
          $res[] = $o;
        }
      }
      return $res;
    }
    return null;
  }
467713
public function getSource($index, $type, $id)
    {
        return $this->db->get([$index, $type, $id]);
    }
137607
public function getCoverUrl($id, $type)
    {
        switch ($type) {
            case self::ITEM_TYPE_ANIMATION:
                return $this->browser->getHost().'/'.$type.'/img/'.(ceil($id / 1000) * 1000).'/'.$id.'/1.jpg';
            case self::ITEM_TYPE_CINEMA:
                return $this->browser->getHost().'/'.$type.'/img/'.(ceil($id / 10000) * 10000).'/'.$id.'/1.jpg';
            default:
                return;
        }
    }
1131694
public static function findByParentModelIdType( $parentId, $parentType, $modelId, $type ) {

		return self::queryByParentModelId( $parentId, $parentType, $modelId )->andWhere( 'type=:type', [ ':type' => $type ] )->all();
	}
139731
public function getById($id, $data = null)
    {
        $data = $this->includeEverything($data);
        return parent::getById($id, $data);
    }
1148547
public function getFollowersIdList( $parentId, $config = [] ) {

	$type = $config[ 'type' ] ?? IFollower::TYPE_FOLLOW;

        return self::findList( [  'column' => 'modelId', 'conditions' => [ 'type' => $type, 'active' => true, 'parentId' => $parentId ] ] );
    }
404961
public static function queryByType( $parentId, $parentType, $type, $config = [] ) {

		$query = static::queryByParent( $parentId, $parentType, $config );

		$query->andWhere( 'type=:type', [ ':type' => $type ] );

		return $query;
	}
878221
public function findOneByOrderIdNotFinished($orderId)
    {
        $qb = $this->createQueryBuilder('p');
        $qb->select('p')
            ->where('p.orderId = :orderId')
            ->andWhere('p.finished is NULL')
            ->setParameter('orderId', strtoupper($orderId))
            ;

        return $qb->getQuery()->getOneOrNullResult();
    }
375437
public function getOrderTypeEntityById($typeId)
    {
        // Get desired status.
        $typeEntity = $this->orderTypeRepository->find($typeId);
        if (!$typeEntity) {
            throw new EntityNotFoundException($this->orderTypeRepository->getClassName(), $typeId);
        }

        return $typeEntity;
    }
419869
public function parent_id(string $type, $id, bool $ignoreUnmapped = false): ParentId
    {
        return new ParentId($type, $id, $ignoreUnmapped);
    }
687717
public function parent($id){
		$geo = Geo::find($id)->getParent();
		$this->applyFilter($geo);
		return \Response::json($geo);
	}
1342563
public function getDeepLinkOrder(string $id, Request $request, Context $context): JsonResponse
    {
        $deepLinkCode = (string) $request->query->get('accessCode');

        if ($id === '' || \strlen($deepLinkCode) !== 32) {
            throw new OrderNotFoundException($id);
        }

        $criteria = new Criteria();
        $criteria->addAssociation('addresses');
        $criteria->addFilter(new EqualsFilter('id', $id));
        $criteria->addFilter(new EqualsFilter('deepLinkCode', $deepLinkCode));

        $orders = $this->orderRepository->search($criteria, $context);
        if ($orders->getTotal() === 0) {
            throw new OrderNotFoundException($id);
        }

        return new JsonResponse($this->serialize($orders->first()));
    }
180965
public static function queryByTypeParent( $parentId, $parentType, $type ) {

		$tableName = static::tableName();

		return self::queryWithModel()->where( "$tableName.parentId=:pid AND $tableName.parentType=:ptype AND $tableName.type=:type", [ ':pid' => $parentId, ':ptype' => $parentType, ':type' => $type ] );
	}
128590
public function getParentCategory(HasNodeInterface $page, $hidden = false)
    {
        $breadcrumbs = $this->getBreadcrumbs($page, $hidden);

        // chop of current page, as it cant be it’s own parent:
        $breadcrumbs = array_slice($breadcrumbs, 0, -1);

        return end($breadcrumbs) ?: null;
    }
463651
public static function getTreeByParentId($parentId, $condition = '', $params = [], $order = 'display_order asc')
    {
        $menuMode = static::find()
            ->findByParentId($parentId)
            ->andWhere($condition, $params)
            ->orderBy($order)
            ->all();
        $tree = [];
        if ($menuMode) {
            foreach ($menuMode as $itemModel) {
                $node = [
                    'menu_id' => $itemModel['menu_id'],
                    'parent_id' => $itemModel['parent_id'],
                    'tab_id' => 'tab_' . $itemModel['menu_id'],
                    'text' => $itemModel['text'],
                    'origin_text' => $itemModel['text'],
                    'title' => $itemModel['title'],
                    'url' => $itemModel['url'],
                    'view_package' => $itemModel['view_package'],
                    'expanded' => (bool) $itemModel['expanded'],
                    'closable' => (bool) $itemModel['closable'],
                    'is_folder' => (bool) $itemModel['is_folder'],
                    'is_expand' => (bool) $itemModel['expanded'],
                    'is_open_url' => (bool) $itemModel['is_open_url'],
                    'is_open_target' => (bool) $itemModel['is_open_target'],
                    'is_every_open' => (bool) $itemModel['is_every_open'],
                    'is_hide' => (bool) $itemModel['is_hide'],
                    'display_order' => $itemModel['display_order'],
                    'params' => $itemModel['params'],
                    'note' => $itemModel['note'],
                    'status' => intval($itemModel['status']),
                ];
                $children = static::getTreeByParentId($itemModel['menu_id'], $condition, $params, $order);
                if ($children) {
                    $node['leaf'] = false;
                    $node['children'] = $children;
                } else {
                    $node['leaf'] = true;
                }
                $tree[] = $node;
            }
        }

        return $tree;
    }
873864
public function update($id, $name, $parentid = 1, $order = null)
    {
        $params = array(
                   'name'       => $name,
                   'parentid'   => $parentid,
                   'order'      => $order,
                   'id'         => $id
                );

        return $this->http->jsonPost(self::API_UPDATE, $params);
    }