Transforms option category entity

@param array $option OptionCategory entity

@return array
171417
public function transform($option)
    {
        $options = $this->entityToArray(OptionCategory::class, $option);
        $data    = ['data' => []];
        foreach ($options as $option) {
            $data['data'][] = [
                'key' => $option,
            ];
        }

        return $data;
    }
642296
public function transform($transformMode = '')
    {
        switch ($transformMode) {
            case ModelInterface::TRANSFORM_TO_JSON_ARRAY:
                return json_encode($this->objectToArray($this));
            default:
                return $this->objectToArray($this);
        }
    }
643052
protected function getConvertOptions(array $options)
    {
        if ($this->arrHas($options, 'convertOptions')) {
            return $this->arrGet($options, 'convertOptions', []);
        }

        return $this->arrGet($options, 'convert_options', []);
    }
525648
public function arsort(int $option = SORT_REGULAR): Collection
    {
        $index = 0;
        $items = $this->items;

        foreach ($items as &$item) {
            $item = [$index++, $item];
        }

        uasort($items, function ($a, $b) use ($option) {
            if ($a[1] === $b[1]) {
                return $a[0] - $b[0];
            }

            $set = [-1 => $b[1], 1 => $a[1]];

            asort($set, $option);
            reset($set);

            return key($set);
        });

        foreach ($items as &$item) {
            $item = $item[1];
        }

        return new static($items);
    }
702726
public function transform($context)
    {
        $classIdParts = explode('\\', get_class($context));
        $option = [
            'id' => $context->id,
            'teamId' => $context->team->id,
            'teamName' => $context->team->name,
            'contextType' => array_pop($classIdParts),
            'role' => $context->role,
            'status' => $context->status,
        ];
        return $option;
    }
329698
protected function normalizeOptions(array $options)
    {
        return array_merge(parent::normalizeOptions($options), [
            'inverse'   => $this->inverse,
            'fixed'     => $this->fixed,
            'static'    => $this->static,
            'brand'     => $this->brand,
            'useForm'   => $this->useForm,
            'rightMenu' => $this->rightMenu,
            ], $options);
    }
426176
public function translateOption(
        string $title,
        string $option,
        string $prefix = ''
    ): string {
        $transformedOption = str_replace('.', '~', $option);
        $key = ltrim("$prefix.aggregation.$title.option.$transformedOption", '.');
        $trans = $this
            ->symfonyTranslator
            ->trans($key, [], 'aggregations');

        return $trans === $key
            ? $option
            : $trans;
    }
1123157
public function getOptionListCategories ($value , $attributes = null , $select = true)
    {
        $options = $this->categoryOption($this->getRootCategories($this->modelType) , $value);
        $attrs = $this->makeAttributesForOption($attributes);
        $newOption = "<option selected value='0'>" . trans('Categories::category.no-parent-category') . " </option>" . $options;
        if ($select == true)
            return "<select $attrs>$newOption</select>";
        else
            return $newOption;
    }
1192789
final protected function get($option)
    {
        if (array_key_exists($key = "$option", $this->options)) {
            return $this->options[$key];
        }

        if (array_key_exists($key, $this->defaults)) {
            return $this->defaults[$key];
        }
    }
1037793
protected function getPackageOption($option)
    {
        $options = $this->package->getExtra();

        if (isset($options[$option])) {
            return $options[$option];
        }

        return '';
    }
1206356
private function extractOptionsFromModel($optionModels)
    {
        $optionModels->each(
            function ($optionModel) {
                $this->options[$optionModel->category_key][$optionModel->key] = $optionModel->value;
            }
        );
    }
924326
public function getOption($option) {
        return isset($this->_options[$option]) ?
            $this->_options[$option] :
            null;
    }
1012603
protected function _dynamicSelectStructure(array $options) : array
    {
        $result = [];
        foreach ($options as $k => $v) {
            $result[$v['label']] = !empty($v['children']) ? $this->_dynamicSelectStructure($v['children']) : [];
        }

        return $result;
    }
647282
public static function config($option = null)
    {
        if (is_array($option)) {
            self::$config = new DataArray($option);
        }
        if (self::$config instanceof DataArray) {
            return self::$config->get();
        }
        return [];
    }
1063906
public function getOption($option)
    {
        if (isset($this->option[$option])) {
            $this->resultCode = Memcached::RES_SUCCESS;
            $this->resultMessage = '';
            return $this->option[$option];

        } else {
            $this->resultCode = Memcached::RES_FAILURE;
            $this->resultMessage = 'Option not seted.';
            return false;
        }
    }
219213
private function replaceTokens($option)
    {
        if (is_array($option)) {
            $tokenizedOptions = [];
            foreach ($option as $key => $opt) {
                $tokenizedOptions[$key] = $this->replaceTokens($opt);
            }

            return $tokenizedOptions;
        }

        return preg_replace_callback(
            '/\$(.+)\$|\$\{(.+)\}/',
            function ($match) {
                $val = isset($match[2]) ? getenv($match[2]) : getenv($match[1]);

                return $val !== false ? $val : $match[0];
            },
            $option
        );
    }
1266550
protected function parseOptions(array $options): array
    {
        $this->setTransformer(new IntegerToLocalizedStringTransformer($this->getLocale(), $this));

        return parent::parseOptions($options);
    }