Return criteria parameters

@param int $critid Criterion ID
@return array
171301
public function get_params($cid) {
        global $DB;
        $params = array();

        $records = $DB->get_records('badge_criteria_param', array('critid' => $cid));
        foreach ($records as $rec) {
            $arr = explode('_', $rec->name);
            $params[$arr[1]][$arr[0]] = $rec->value;
        }

        return $params;
    }
996425
public function getFacetsByCriteria(Criteria $criteria)
    {
        $qb = $this->createCriteriaQueryBuilder($criteria, 'm');

        $channelsQb = clone $qb;
        $channels = $channelsQb->select('DISTINCT m.channel')->getQuery()->getScalarResult();

        $typeQb = clone $qb;
        $types = $typeQb->select('DISTINCT m.type')->getQuery()->getScalarResult();

        $priorityQb = clone $qb;
        $priorities = $priorityQb->select('DISTINCT m.priority')->getQuery()->getScalarResult();

        $roleQb = clone $qb;
        $roles = $roleQb->select('DISTINCT m.role')->getQuery()->getScalarResult();

        return [
            'channels' => array_column($channels, 'channel'),
            'types' => array_column($types, 'type'),
            'priorities' => array_column($priorities, 'priority'),
            'roles' => array_column($roles, 'role'),
        ];
    }
306894
protected function getCondition(Criterion $criterion)
    {
        $terms = array();
        $values = (array)$criterion->value;

        foreach ($values as $value) {
            $terms[] = array(
                'match' => array(
                    'fields_doc.' . $criterion->target => array(
                        'query' => $value,
                    ),
                ),
            );
        }

        return $terms;
    }
120690
public function getRules($uid){
        
        $ruleIds = $this->getRuleIds($uid);
        
        $rules = DB::table($this->dbTablePrefix . $this->tableAuthRule)
                ->where('id' , 'in' , $ruleIds)
                ->where('status' , '1')
                ->order('sort asc')
                ->select();
        
        return $rules;
    }
1271041
public function getPidFromUid($uid = 0)
    {
        $queryBuilder = self::getQueryBuilder();
        $triggerElement = $queryBuilder
            ->select('pid')
            ->from('tt_content')
            ->where(
                $queryBuilder->expr()->eq(
                    'uid',
                    $queryBuilder->createNamedParameter(abs($uid), \PDO::PARAM_INT)
                )
            )
            ->execute()
            ->fetch();
        $pid = (int)$triggerElement['pid'];
        return is_array($triggerElement) && $pid ? $pid : 0;
    }
464394
protected function serializeCriterion($criterion)
    {
        try {
            serialize($criterion);

            return $criterion;
        } catch (Exception $e) {
            // We want to take care of the closure serialization errors,
            // other than that we will simply re-throw the exception.
            if ($e->getMessage() !== "Serialization of 'Closure' is not allowed") {
                throw $e;
            }

            $r = new ReflectionObject($criterion);

            return [
                'hash' => md5((string) $r),
                'properties' => $r->getProperties(),
            ];
        }
    }
496935
public function getGroups($uid) {
        static $groups = array();
        if (isset($groups[$uid]))
            return $groups[$uid];
        $user_groups = M()
            ->table($this->_config['AUTH_GROUP_ACCESS'] . ' a')
            ->where("a.uid='$uid' and g.status='1'")
            ->join($this->_config['AUTH_GROUP']." g on a.group_id=g.id")
            ->field('uid,group_id,title,rules')->select();
        $groups[$uid]=$user_groups?:array();
        return $groups[$uid];
    }
514576
public function prepareCriteria($criteria)
    {
        if (is_null($criteria)) {
            $criteria = array();
        }

        if (array_key_exists('$id', $criteria)) {
            $criteria['id'] = $criteria['$id'];
            unset($criteria['$id']);
        }

        return $criteria ? : array();
    }
766680
public function clientGetByUid($uid)
  {
    foreach($this->clientList() as $client)
    {
      if($client["client_unique_identifier"] == $uid) return $client;
    }

    throw new Exception("invalid clientID", 0x200);
  }
1232953
public function listComments(string $gistId): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/gists/:gist_id/comments', $gistId));
    }
1100075
private function getCriteriaAsSting(array $criteria): string
    {
        $criteriaString = '';
        foreach ($criteria as $key => $value) {
            $criteriaString .= $key.': '.$value.', ';
        }

        return substr($criteriaString, 0, -2);
    }
677836
protected function getCondition(Criterion $criterion)
    {
        $filters = array();

        foreach ($criterion->value as $value) {
            $filters[] = array(
                'prefix' => array(
                    'locations_doc.path_string_id' => $value,
                ),
            );
        }

        return $filters;
    }
224822
private function _getCriteriaNames( MW_Common_Criteria_Expression_Interface $expr )
	{
		if( $expr instanceof MW_Common_Criteria_Expression_Compare_Interface ) {
			return array( $expr->getName() );
		}

		if( $expr instanceof MW_Common_Criteria_Expression_Combine_Interface )
		{
			$list = array();
			foreach( $expr->getExpressions() as $item ) {
				$list = array_merge( $list, $this->_getCriteriaNames( $item ) );
			}
			return $list;
		}

		if( $expr instanceof MW_Common_Criteria_Expression_Sort_Interface ) {
			return array( $expr->getName() );
		}

		return array();
	}
459771
public function getMasterList()
    {
        $list = [];
        foreach ($this->getCriteria() as $c) {
            if ($c instanceof Criteria) {
                $list = array_merge($list, $c->getMasterList());
            } else {
                $list[] = $c->getMaster();
            }
        }
        return $list;
    }
698034
public function criteriaAttributes(): array
    {
        // By default, include all public, non-static properties that were defined by a sub class, and certain ones
        // in this class
        /** @noinspection PhpUnhandledExceptionInspection */
        $class = new \ReflectionClass($this);
        $names = [];

        foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
            if (!$property->isStatic()) {
                $dec = $property->getDeclaringClass();
                if (($dec->getName() === self::class || $dec->isSubclassOf(self::class))
                ) {
                    $names[] = $property->getName();
                }
            }
        }

        return $names;
    }
861202
public function getIdRules()
    {
        if ($this->idAttribute == false) {
            return [];
        }
        if ($this->idAttributeSafe || $this->idAttributeType === static::$idTypeAutoIncrement) {
            return [
                [[$this->idAttribute], 'safe'],
            ];
        }
        if (is_string($this->idAttribute) && !empty($this->idAttribute) &&
            is_int($this->idAttributeLength) &&
            $this->idAttributeLength > 0) {
            $rules = [
                [[$this->idAttribute], 'required'],
                [[$this->idAttribute], 'unique'],
            ];
            if ($this->idAttributeType === static::$idTypeInteger) {
                $rules[] = [
                    [$this->idAttribute], 'number', 'integerOnly' => true
                ];
            }
            if ($this->idAttributeType === static::$idTypeString) {
                $rules[] = [[$this->idAttribute], 'string',
                    'max' => $this->idAttributeLength,];
            }
            return $rules;
        }
        return [];
    }
893922
public function getBody( $uid = '' )
	{
		$context = $this->getContext();
		$site = $context->getLocale()->getSiteId();
		$view = $this->getView();

		/** client/html/basket/mini
		 * All parameters defined for the small basket component and its subparts
		 *
		 * This returns all settings related to the small basket component.
		 * Please refer to the single settings for details.
		 *
		 * @param array Associative list of name/value settings
		 * @category Developer
		 * @see client/html/basket#mini
		 */
		$config = $context->getConfig()->get( 'client/html/basket/mini', [] );
		$key = $this->getParamHash( [], $uid . $site . ':basket:mini-body', $config );

		if( ( $html = $this->getBasketCached( $key ) ) === null )
		{
			try
			{
				if( !isset( $this->view ) ) {
					$view = $this->view = $this->getObject()->addData( $view );
				}

				$output = '';
				foreach( $this->getSubClients() as $subclient ) {
					$output .= $subclient->setView( $view )->getBody( $uid );
				}
				$view->miniBody = $output;
			}
			catch( \Aimeos\Client\Html\Exception $e )
			{
				$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
				$view->miniErrorList = $view->get( 'miniErrorList', [] ) + $error;
			}
			catch( \Aimeos\Controller\Frontend\Exception $e )
			{
				$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
				$view->miniErrorList = $view->get( 'miniErrorList', [] ) + $error;
			}
			catch( \Aimeos\MShop\Exception $e )
			{
				$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
				$view->miniErrorList = $view->get( 'miniErrorList', [] ) + $error;
			}
			catch( \Exception $e )
			{
				$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
				$view->miniErrorList = $view->get( 'miniErrorList', [] ) + $error;
				$this->logException( $e );
			}

			/** client/html/basket/mini/standard/template-body
			 * Relative path to the HTML body template of the basket mini client.
			 *
			 * The template file contains the HTML code and processing instructions
			 * to generate the result shown in the body of the frontend. The
			 * configuration string is the path to the template file relative
			 * to the templates directory (usually in client/html/templates).
			 *
			 * You can overwrite the template file configuration in extensions and
			 * provide alternative templates. These alternative templates should be
			 * named like the default one but with the string "standard" replaced by
			 * an unique name. You may use the name of your project for this. If
			 * you've implemented an alternative client class as well, "standard"
			 * should be replaced by the name of the new class.
			 *
			 * @param string Relative path to the template creating code for the HTML page body
			 * @since 2014.03
			 * @category Developer
			 * @see client/html/basket/mini/standard/template-header
			 */
			$tplconf = 'client/html/basket/mini/standard/template-body';
			$default = 'basket/mini/body-standard';

			$html = $view->render( $view->config( $tplconf, $default ) );
			$this->setBasketCached( $key, $html );
		}
		else
		{
			$html = $this->modifyBody( $html, $uid );
		}

		return $html;
	}