Returns list of keys for defined variants.

@param bool $withOriginal
@return string[]
484470
public function variants($withOriginal = false)
    {
        $variants = array_keys($this->config->variantConfigs());

        if ($withOriginal && ! in_array(FileHandler::ORIGINAL, $variants)) {
            array_unshift($variants, FileHandler::ORIGINAL);
        }

        return $variants;
    }
1132342
private function compileWith($with)
    {
        static $mapping = [
            'rule'     => self::WITH_RULE,
            'media'    => self::WITH_MEDIA,
            'supports' => self::WITH_SUPPORTS,
            'all'      => self::WITH_ALL,
        ];

        // exclude selectors by default
        $without = static::WITH_RULE;

        if ($this->libMapHasKey([$with, static::$with])) {
            $without = static::WITH_ALL;

            $list = $this->coerceList($this->libMapGet([$with, static::$with]));

            foreach ($list[2] as $item) {
                $keyword = $this->compileStringContent($this->coerceString($item));

                if (array_key_exists($keyword, $mapping)) {
                    $without &= ~($mapping[$keyword]);
                }
            }
        }

        if ($this->libMapHasKey([$with, static::$without])) {
            $without = 0;

            $list = $this->coerceList($this->libMapGet([$with, static::$without]));

            foreach ($list[2] as $item) {
                $keyword = $this->compileStringContent($this->coerceString($item));

                if (array_key_exists($keyword, $mapping)) {
                    $without |= $mapping[$keyword];
                }
            }
        }

        return $without;
    }
165553
public function getFieldValues($with_nulls = true)
    {
        $request_values = $this->getRequest()->all();

        $values = [];
        foreach ($this->getAllAttributes() as $attribute) {
            $value = Arr::get($request_values, $attribute);
            if ($with_nulls || $value !== null) {
                Arr::set($values, $attribute, $value);
            }
        }

        // If this form is a child form, cherry pick a part
        if ($prefix = $this->getName()) {
            $prefix = $this->formHelper->transformToDotSyntax($prefix);
            $values = Arr::get($values, $prefix);
        }

        // Allow form-specific value alters
        $this->formHelper->alterFieldValues($this, $values);

        return $values;
    }
1148103
protected function getPossibleKeys()
	{
		$keys = [];
		foreach (range('a', 'z') as $char)
		{
			$keys[] = $this->keyPrefix . $char;
		}

		return $keys;
	}
1057663
public function get_tree(string $id, bool $with_config = true): array
  {
    if (
      \bbn\str::is_uid($id) &&
      ($p = $this->get($id, $with_config))
    ){
      $p['items'] = $this->get_full_bits($id, null, $with_config);
      return $p;
    }
    return [];
  }
326559
public static function getRequiredFields(bool $withSchema = false) : array
    {
        return $withSchema ? self::$_requiredFields : array_keys(self::$_requiredFields);
    }
56881
public function transformForJsonRequest(array $appends = [], $withType = true): array
    {
        if (!$withType) {
            return $this->propertiesToArray([], $this->jsonAliases);
        }
        $messageType = $this->getType();
        $data = array_merge(['msgtype' => $messageType], $appends);

        $data[$messageType] = array_merge($data[$messageType] ?? [], $this->propertiesToArray([], $this->jsonAliases));

        return $data;
    }
1076215
protected function getKeys()
    {
        $identifier = $this->getIdentifier();

        $query = new Query();
        $selectNode = new Node\SelectNode([$identifier]);
        $query->setSelect($selectNode);
        $queryResult = $this->query($query);
        $keysArray = [];

        foreach ($queryResult as $row) {
            $keysArray[] = $row[$identifier];
        }

        return $keysArray;
    }
1365498
public static function bancontact($UUID, $withBase64 = false)
    {
        $qrUrl = 'https://chart.googleapis.com/chart?cht=qr&chs=260x260&chl=https://qr.pisp.me/bc/' . $UUID;
        $result = [
            'url' => 'https://qr.pisp.me/bc/' . $UUID,
            'QRUrl' => $qrUrl
        ];
        if($withBase64) $result['QRBase64'] = base64_encode(file_get_contents($qrUrl));

        return $result;
    }
513891
protected function getUnavailableKeys()
	{
		preg_match_all('(' . preg_quote($this->keyPrefix) . '.)', $this->xsl, $matches);

		return array_unique($matches[0]);
	}
1336516
public function getParents($withSelf = TRUE) {
    $node = $this;
    $parents = array();
    while ($node->getParent() != NULL) {
      $parents[] = $node->getParent();
      $node = $node->getParent();
    }
    if ($withSelf) array_unshift($parents,$this);
    return $parents;
  }
749929
private function renderObjects($withNamespace)
    {
        $code = array();
        foreach ($this->getObjects() as $object) {
            $originalUses = $object->getUses();
            $object->setUses(array());
            if ($withNamespace === false) {
                $originalNamespace = $object->getNamespace();
                $object->setNamespace(null);
                $code[] = $object->generate();
                $object->setNamespace($originalNamespace);
            } else {
                $code[] = $object->generate();
            }

            $object->setUses($originalUses);
            $code[] = null;
        }

        return $code;
    }
902461
public function getVotesList ($tag = null, bool $with = true) : array
    {
        return $this->_Votes->getVotesList(VoteUtil::tagsConvert($tag), $with);
    }
1169688
public function toArray($withTranslations = true)
    {
        $attributes = parent::toArray();

        if ($withTranslations && $this->hasTranslatedAttributes()) {
            foreach ($this->getTranslatedAttributes() as $field) {
                if ($translations = $this->getTranslation()) {
                    $attributes[$field] = $translations->$field;
                }
            }
        }

        return $attributes;
    }
186354
public function getKeys($pattern = null)
    {
        $keys = $this->get('__stored_keys__', []);
        if (is_null($pattern)) {
            return $keys;
        }

        $matches = [];
        $pattern = $this->_normalizePattern($pattern);
        foreach ($keys as $key) {
            if (preg_match($pattern, $key)) {
                $matches[] = $key;
            }
        }

        return $matches;
    }
1052582
public function getKey($withPrefix = false)
    {
        $key = ($withPrefix) ? $this->prefix : '';
        $key .= $this->key;

        return $key;
    }
628922
public function getChilds($withOwnRole = false)
    {
        $id         = $this->id;
        $roles      = $this->withTrashed()->orderby('parent_id')->get()->toArray();
        $lowerRoles = $this->getLowerRoles($roles, $id);
        return ($withOwnRole) ? array_merge([$this->id], $lowerRoles) : $lowerRoles;
    }