Operation findOrganizationMenu

Finds organizations menu

@param string $organizationId Organization id (required)
@param string $menuId menu id (required)
@return \KuntaAPI\Model\Menu
@throws \KuntaAPI\ApiException on non-2xx response
778690
public function findOrganizationMenu($organizationId, $menuId)
    {
        list($response) = $this->findOrganizationMenuWithHttpInfo($organizationId, $menuId);
        return $response;
    }
1152307
public function ajaxAction(Request $request, $menuId)
    {
        $entityId = $request->query->get('id');
        $currentId = $request->query->get('currentId');

        $objectManager = $this->getDoctrine()->getManager();
        $filter = array(
            'menu' => $objectManager->getReference('ClasticMenuBundle:Menu', $menuId),
            'parent' => null,
        );

        if (intval($entityId)) {
            $filter['parent'] = $objectManager->getReference('ClasticMenuBundle:MenuItem', (int) $request->query->get('id'));
        }

        $items = $this->getDoctrine()
            ->getRepository('ClasticMenuBundle:MenuItem')
            ->findBy($filter);

        $data = array_map(function (MenuItem $item) use ($currentId) {
            return array(
                'id' => $item->getId(),
                'text' => $item->getTitle(),
                'children' => true,
                'state' => array(
                    'disabled' => ($item->getId() != $currentId),
                ),
            );
        }, $items);

        if (!$currentId && is_null($filter['parent'])) {
            $data[] = array(
                'id' => 'current',
                'text' => 'New Item',
                'children' => false,
                'state' => array(
                    'disabled' => false,
                ),
            );
        }

        return new JsonResponse($data);
    }
872636
public function delconditional($menuid)
    {
        $params = array(
            "menuid" => $menuid
        );
        $rst = $this->_request->post($this->_url . 'menu/delconditional', $params);
        return $this->_client->rst($rst);
    }
880646
public function editAction(Request $request, $menuid, $id)
    {
        return parent::doEditAction($this->getAdminListConfigurator($request, $menuid, $id), $id, $request);
    }
232531
public static function get_menu_settings( $menu_id ) {
		$menu_settings = self::get( sprintf( 'menu_%d', $menu_id ) );
		$menu_settings = apply_filters( 'menu_icons_menu_settings', $menu_settings, $menu_id );

		if ( ! is_array( $menu_settings ) ) {
			$menu_settings = array();
		}

		return $menu_settings;
	}
1056495
public function byTypeAndByOrganization($type , $organizationId, $databaseConnectionName = null)
  {
    if(empty($databaseConnectionName))
    {
      $databaseConnectionName = $this->databaseConnectionName;
    }

    return $this->File->setConnection($databaseConnectionName)
      ->where('type', '=', $type)
      ->where('organization_id', '=', $organizationId)
      ->get();
  }
995937
public function getByOrganizationByPeriodAndByStatus($organizationId, $periodIds, $status, $databaseConnectionName = null)
  {
    if(empty($databaseConnectionName))
    {
      $databaseConnectionName = $this->databaseConnectionName;
    }

    return $this->JournalVoucher->setConnection($databaseConnectionName)
      ->where('organization_id', '=', $organizationId)
      ->whereIn('period_id', $periodIds)
      ->where('status', '=', $status)
      ->get();
  }
1213587
public function listOrganizationsAction($id, Request $request)
    {
        $resource = $this->resourceRepo->findOneBy(['uuid' => $id]);
        $organizations = !empty($resource) ? $resource->getOrganizations() : [];
        $organizationsUuids = array_map(function (Organization $organization) {
            return $organization->getUuid();
        }, $organizations);

        return new JsonResponse(
            $this->finder->search('Claroline\CoreBundle\Entity\Organization\Organization', array_merge(
                $request->query->all(),
                ['hiddenFilters' => ['whitelist' => $organizationsUuids]]
            ))
        );
    }
95779
public function deleteOrganizer($organizerId)
    {
        if ($this->organizerId === $organizerId) {
            $this->apply(
                $this->createOrganizerDeletedEvent($organizerId)
            );
        }
    }
323247
public function findByOrganization($organization, $params = array(), $options = array())
    {
        $path = sprintf("/organizations/%s/teams", $organization);
        return $this->client->getCollection($path, $params, $options);
    }
1141902
public static function setIdActiveMenu ( $id )
    {
        self::$_idActiveMenu = $id;
        self::$_activeMenu = Menu::find($id);
    }
1067136
public function subMenu($key = null, $menuItem = null)
    {
        if (null === $menuItem) {
            return $this->subMenu;
        }

        if (is_callable($menuItem)) {
            $menu = new AdminMenu($menuItem);
            $this->subMenu[$key] = $menu;
        } else {
            $this->subMenu[$key] = $menuItem;
        }

        return $this;
    }
1242922
public function getAdminListConfigurator(Request $request, $menuid, $entityId = null)
    {
        if (!isset($this->configurator)) {
            $menu = $this->getDoctrine()->getManager()->getRepository(
                $this->container->getParameter('kunstmaan_menu.entity.menu.class')
            )->find($menuid);
            $rootNode = $this->container->get('kunstmaan_admin.domain_configuration')->getRootNode();

            $configuratorClass = $this->container->getParameter('kunstmaan_menu.adminlist.menuitem_configurator.class');
            $this->configurator = new $configuratorClass($this->getEntityManager(), null, $menu);

            $adminType = $this->container->getParameter('kunstmaan_menu.form.menuitem_admintype.class');
            $menuItemClass = $this->container->getParameter('kunstmaan_menu.entity.menuitem.class');
            $this->configurator->setAdminType($adminType);
            $this->configurator->setAdminTypeOptions(array('menu' => $menu, 'rootNode' => $rootNode, 'menuItemClass' => $menuItemClass, 'entityId' => $entityId, 'locale' => $request->getLocale()));
        }

        return $this->configurator;
    }
978676
public function findPostingForId($id)
    {
        $dql = '
            SELECT    p
            FROM      %s p
            WHERE     p.id = :id
            AND       p.organization = :organization
        ';

        return $this->em
            ->createQuery(sprintf($dql, $this->postingFqcn))
            ->setParameter('id', $id)
            ->setParameter('organization', $this->oh->getOrganization())
            ->getSingleResult()
        ;
    }
308950
public function find_parent_item_in_menu( $menu_items, $parent_id ) {
		foreach ( $menu_items as &$item ) {
			if ( $item->ID == $parent_id ) {
				return $item;
			}
		}
	}
434620
private function buildMenuFromRepository($menuCode)
    {
        $menu = $this
            ->menuRepository
            ->findOneBy([
                'code' => $menuCode,
                'enabled' => true,
            ]);

        if (!($menu instanceof MenuInterface)) {
            throw new Exception(sprintf(
                'Menu "%s" not found',
                $menuCode
            ));
        }

        $this
            ->menuObjectManager
            ->detach($menu);

        return $menu;
    }
1202551
public function getChildOrganizations($parentId = null)
    {
        static $children;

        if (is_null($parentId)) {
            return array();
        }

        if (! isset($children[$parentId])) {
            $organizations = $this->db->fetchPairs(
                    'SELECT gor_id_organization, gor_name
                        FROM gems__organizations
                        WHERE gor_active=1 AND gor_has_login=1 AND
                            (gor_accessible_by LIKE ' . $this->db->quote('%:' . $parentId . ':%') . ' OR
                                gor_id_organization = ' . $this->db->quote($parentId) .  ')
                            ORDER BY gor_name');

            natsort($organizations);

            $children[$parentId] = $organizations;
        }

        return $children[$parentId];
    }