Get drill down

@see http://api.yandex.ru/metrika/doc/beta/api_v1/drilldown.xml

@param Models\TableParams $params
@param array $parentId
@return Models\DrillDown
553008
public function getDrillDown(Models\TableParams $params, array $parentId = [])
    {
        $resource = 'drilldown';
        $params = $params->toArray();

        if (!empty($parentId)) {
            $params['parent_id'] = json_encode($parentId);
        }

        $response = $this->sendGetRequest($resource, $params);
        $dataResponse = new Models\DrillDown($response);
        return $dataResponse;
    }
1171288
public function getParam($param)
    {
        if (isset($this->_parentConfig))
            return ($this->_parentConfig->getParam($param));
        return (isset($this->_params[$param]) ? $this->_params[$param] : null);
    }
872747
public function addAction($parentId)
    {
        $models = $this->container->getParameter('fulgurio_light_cms.models');
        // We remove models if it s unique and there's one in database
        foreach ($models as $modelName => $model)
        {
            if ($model['is_unique'])
            {
                $em = $this->getDoctrine()->getManager();
                if ($em->getRepository('FulgurioLightCMSBundle:Page')->findOneBy(array('model' => $modelName)))
                {
                    unset($models[$modelName]);
                }
            }
        }
        $page = new Page();
        $parent = $this->getPage($parentId);
        if (!$models[$parent->getModel()]['allow_children'])
        {
            throw new AccessDeniedException();
        }
        $page->setParent($parent);
        return $this->createPage(
                $page,
                array('parent' => $parent),
                $models
        );
    }
455313
private function appendIdMethodParameterNode(IdMethodParameter $parameter, \DOMNode $parentNode)
    {
        $idMethodParameterNode = $parentNode->appendChild($this->document->createElement('id-method-parameter'));
        if ($name = $parameter->getName()) {
            $idMethodParameterNode->setAttribute('name', $name);
        }
        $idMethodParameterNode->setAttribute('value', $parameter->getValue());
    }
130907
public static function getUrlsByParentId($isSuper, $menuIdList, $parentId, $condition = '', $params = [], $order = 'display_order asc')
    {
        $data = static::find()
            ->normal()
            ->findByParentId($parentId)
            ->andWhere($condition, $params)
            ->active()
            ->orderBy($order)
            ->asArray()
            ->all();
        $urls = [];
        if ($data) {
            foreach ($data as $item) {
                if ($isSuper || in_array($item['menu_id'], $menuIdList)) {
                    $menuUrls = DpAdminMenuUrlRelation::getAllUrlByMenuId($item['menu_id']);
                    if ($menuUrls) {
                        foreach ($menuUrls as $menuUrl) {
                            $urls[$menuUrl['alias']] = Url::toRoute($menuUrl['route']);
                        }
                    }
                    $childrenUrls = static::getUrlsByParentId($isSuper, $menuIdList, $item['menu_id'], $condition, $params, $order);
                    if ($childrenUrls) {
                        $urls = array_merge($urls, $childrenUrls);
                    }
                }
            }
        }

        return $urls;
    }
216828
public function get($pageId, array $params = array())
    {
        $endpoint = '/admin/pages/'.$pageId.'.json';
        $response = $this->request($endpoint, 'GET', $params);
        return $this->createObject(Page::class, $response['page']);
    }
287077
public static function getTree($vid, $parentID = false)
    {
        $rows = static::findHierarchy($vid, $parentID);
        $hierarchy = static::indexByChild($rows);

        /** @var Term [] $models */
        $models = Term::find()
            ->indexBy('id')
            ->where(['vid' => $vid])
            ->all();

        //add child to parents by list
        foreach ($hierarchy as $cID => $pID) {
            if (isset($models[$pID]) && isset($models[$cID])) {
                $models[$pID]->addChild($models[$cID]);
            }
        }

        $roots = [];

        foreach ($models as $id => $model) {
            if (isset($hierarchy[$id]) && $hierarchy[$id] == 0) {
                $roots[$id] = $model;
            }
        }

        return isset($models[$parentID]) ? $models[$parentID]->child : $roots;
    }
676090
public function listForId($orderId, array $parameters = [])
    {
        $this->parentId = $orderId;

        return parent::rest_list(null, null, $parameters);
    }
811552
public static function findByParent( $parentId, $parentType, $config = [] ) {

		return self::queryByParent( $parentId, $parentType, $config )->all();
	}
267389
public function findChildrenTreeByParentId($parent_id)
    {
        $qb = $this->createQueryBuilder();

        $qb = $this->alterQueryBuilderWithParentRoot($qb, $parent_id);

        $qb->orderBy($qb->getRootAliases()[0] . '.lft', 'ASC');

        return $this->getResultFromQueryBuilder($qb);
    }
1031892
public static function findFirstByParent( $parentId, $parentType, $config = [] ) {

		return self::queryByParent( $parentId, $parentType, $config )->one();
	}
1292318
public static function find($id, array $params = [])
    {
        $instance = new static([], static::getParentID());

        return $instance->request($instance->getEndpoint(), 'find', [$id, $params]);
    }
55384
public function getComparisonDrillDown(Models\DrillDownComparisonParams $params)
    {
        $resource = 'comparison/drilldown';
        $response = $this->sendGetRequest($resource, $params->toArray());
        $dataResponse = new Models\DrillDownComparison($response);
        return $dataResponse;
    }
499786
public function deleteByParent( $parentId, $parentType ) {

		//$modelClass	= static::$modelClass;

		//return $modelClass::deleteByParent( $parentId, $parentType );

		$models	= $this->getByParent( $parentId, $parentType );

		foreach ( $models as $model ) {

			$this->delete( $model );
		}
	}
1337960
public function findChildrenByParentId($parent_id)
    {
        $qb = $this->createQueryBuilder();
        $qb->andWhere($qb->getRootAliases()[0] . '.parent = ' . $this->addNamedParameter('parent', $parent_id, $qb))
            ->orderBy($qb->getRootAliases()[0] . '.position', 'ASC');
        return $qb->getQuery()->getResult();
    }
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];
    }
562778
public function getAllForFolder(string $id, array $params = [])
    {
        return $this->executeRequest(
            RequestMethodEnum::GET,
            ResourceMethodEnum::GET_ALL_FOR_FOLDER,
            $params,
            $id
        );
    }